Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Use loop instead of list comprehension
Artur Smęt1d9120d3bd63
diff --git a/saleor/cart/utils.py b/saleor/cart/utils.pyindex dfb30d5266..b0b896c577 100644--- a/saleor/cart/utils.py+++ b/saleor/cart/utils.py@@ -7,8 +7,8 @@ from satchless.item import InsufficientStockdef contains_unavailable_variants(cart):try:- [line.variant.check_quantity(line.quantity)- for line in cart.lines.all()]+ for line in cart.lines.all():+ line.variant.check_quantity(line.quantity)except InsufficientStock:return Truereturn False