Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Change aggregation of stock allocations to single allocation (#6362)
Grzegorz Derdak1ac7688df2f5
diff --git a/saleor/graphql/warehouse/types.py b/saleor/graphql/warehouse/types.pyindex 60442dd3b3..6274be2c65 100644--- a/saleor/graphql/warehouse/types.py+++ b/saleor/graphql/warehouse/types.py@@ -116,6 +116,4 @@ class Allocation(CountableDjangoObjectType):[ProductPermissions.MANAGE_PRODUCTS, OrderPermissions.MANAGE_ORDERS])def resolve_quantity(root, *_args):- return root.stock.allocations.aggregate(- quantity_allocated=Coalesce(Sum("quantity_allocated"), 0)- )["quantity_allocated"]+ return root.quantity_allocated