From b547f6b309dc671ca20deed21e28f6eeceb38df4 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 17 Apr 2018 23:20:54 +1000 Subject: [PATCH] CustomerOrderLine quantity must be positive --- InvenTree/customer_orders/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/customer_orders/models.py b/InvenTree/customer_orders/models.py index 93171fe2a7..f22272075b 100644 --- a/InvenTree/customer_orders/models.py +++ b/InvenTree/customer_orders/models.py @@ -57,7 +57,7 @@ class CustomerOrderLine(models.Model): part = models.ForeignKey(Part, blank=True, help_text="Part") # TODO: should quantity field here somehow related to quantity field of related part? Views will handle this, right? - quantity = models.IntegerField(blank=True, help_text="Quantity of part") + quantity = models.PositiveIntegerField(blank=True, help_text="Quantity of part") # Line notes notes = models.TextField(blank=True, help_text="Line notes")