mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-05 09:55:28 +00:00
Fixed exception for quantity check
This commit is contained in:
1 parent
a63d5012f0
commit
d072187bf8
1 file changed
+1
-1
@@ -342,7 +342,7 @@ class PurchaseOrder(Order):
|
||||
if quantity < 0:
|
||||
raise ValidationError({"quantity": _("Quantity must be a positive number")})
|
||||
quantity = int(quantity)
|
||||
except ValueError:
|
||||
except (ValueError, TypeError):
|
||||
raise ValidationError({"quantity": _("Invalid quantity provided")})
|
||||
|
||||
# Create a new stock item
|
||||
|
||||
Reference in new issue
Block a user