mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 19:46:46 +00:00
type checking
This commit is contained in:
parent
6919eaa1e1
commit
c31b72bde2
@ -52,7 +52,10 @@ class RoundingDecimalFormField(forms.DecimalField):
|
|||||||
Why? It looks nice!
|
Why? It looks nice!
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return value.normalize()
|
if type(value) == Decimal:
|
||||||
|
return value.normalize()
|
||||||
|
else:
|
||||||
|
return value
|
||||||
|
|
||||||
|
|
||||||
class RoundingDecimalField(models.DecimalField):
|
class RoundingDecimalField(models.DecimalField):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user