Skip to content

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

Allow to remove lines by sending zero quantity

Adam Bogdał1f31e7fc3822
diff --git a/saleor/graphql/checkout/mutations.py b/saleor/graphql/checkout/mutations.py
index 63efc04a65..1c2f2b4d69 100644
--- a/saleor/graphql/checkout/mutations.py
+++ b/saleor/graphql/checkout/mutations.py
@@ -92,7 +92,7 @@ def update_checkout_shipping_method_if_invalid(checkout: models.Checkout, discou
def check_lines_quantity(variants, quantities):
"""Check if stock is sufficient for each line in the list of dicts."""
for variant, quantity in zip(variants, quantities):
- if quantity < 1:
+ if quantity < 0:
raise ValidationError(
{
"quantity": ValidationError(