Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Simplify is_fulfilled Order method
Anna Siwik0547c506b57e
diff --git a/saleor/order/models.py b/saleor/order/models.pyindex 800065e108..0043015a2d 100644--- a/saleor/order/models.py+++ b/saleor/order/models.py@@ -194,8 +194,7 @@ class OrderLine(models.Model):return sum([line.quantity for line in lines])def is_fulfilled(self):- lines = FulfillmentLine.objects.filter(order_line=self)- return sum([line.quantity for line in lines]) >= self.quantity+ return self.quantity_fulfilled >= self.quantityclass Fulfillment(models.Model):