mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-04 09:25:21 +00:00
Allow validation of empty money values
This commit is contained in:
1 parent
f96051d863
commit
d267d04bed
1 file changed
+1
-1
@@ -46,7 +46,7 @@ class InvenTreeMoneySerializer(MoneyField):
|
|||||||
amount = None
|
amount = None
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if amount is not None:
|
if amount is not None and amount is not empty:
|
||||||
amount = Decimal(amount)
|
amount = Decimal(amount)
|
||||||
except:
|
except:
|
||||||
raise ValidationError({
|
raise ValidationError({
|
||||||
|
|||||||
Reference in new issue
Block a user