mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +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!
|
||||
"""
|
||||
|
||||
if type(value) == Decimal:
|
||||
return value.normalize()
|
||||
else:
|
||||
return value
|
||||
|
||||
|
||||
class RoundingDecimalField(models.DecimalField):
|
||||
|
Loading…
Reference in New Issue
Block a user