Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Set stock location in OrderItem as charfield

Mira Szewczykd22dc027ce0f
diff --git a/saleor/order/models.py b/saleor/order/models.py
index a484691c14..334f4ca61f 100644
--- a/saleor/order/models.py
+++ b/saleor/order/models.py
@@ -252,7 +252,7 @@ class DeliveryGroup(models.Model, ItemSet):
product_sku=product_variant.sku,
unit_price_gross=price.gross,
stock=stock,
- stock_location=stock.location if stock else None)
+ stock_location=stock.location.location if stock else None)
if stock:
# allocate quantity to avoid overselling
Stock.objects.allocate_stock(stock, quantity)