mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +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:
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user