mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-28 18:44:31 +00:00
type checking
This commit is contained in:
1 parent
6919eaa1e1
commit
c31b72bde2
1 file changed
+4
-1
@@ -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):
|
||||||
|
|||||||
Reference in new issue
Block a user