Skip to content

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

Set max_value of QuantityField to 999

Artur Smęt7225ef1f92d6
diff --git a/saleor/cart/forms.py b/saleor/cart/forms.py
index 821fba0950..558f3b0497 100644
--- a/saleor/cart/forms.py
+++ b/saleor/cart/forms.py
@@ -11,7 +11,8 @@ from satchless.item import InsufficientStock
class QuantityField(forms.IntegerField):
def __init__(self, *args, **kwargs):
- super(QuantityField, self).__init__(min_value=0, initial=1)
+ super(QuantityField, self).__init__(min_value=0, max_value=999,
+ initial=1)
class AddToCartForm(forms.Form):