Enforces minimum quantity of 0 for quantity boxes

This commit is contained in:
Christopher Neugebauer 2016-04-06 22:57:40 +10:00
parent dba3773636
commit 0b7ccfc827

View file

@ -55,6 +55,7 @@ class _QuantityBoxProductsForm(_ProductsForm):
field = forms.IntegerField(
label=product.name,
help_text=help_text,
min_value=0,
)
cls.base_fields[cls.field_name(product)] = field