mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-01 13:06:45 +00:00
Fixed exception for quantity check
This commit is contained in:
parent
a63d5012f0
commit
d072187bf8
@ -342,7 +342,7 @@ class PurchaseOrder(Order):
|
|||||||
if quantity < 0:
|
if quantity < 0:
|
||||||
raise ValidationError({"quantity": _("Quantity must be a positive number")})
|
raise ValidationError({"quantity": _("Quantity must be a positive number")})
|
||||||
quantity = int(quantity)
|
quantity = int(quantity)
|
||||||
except ValueError:
|
except (ValueError, TypeError):
|
||||||
raise ValidationError({"quantity": _("Invalid quantity provided")})
|
raise ValidationError({"quantity": _("Invalid quantity provided")})
|
||||||
|
|
||||||
# Create a new stock item
|
# Create a new stock item
|
||||||
|
Loading…
x
Reference in New Issue
Block a user