mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Style fixes
This commit is contained in:
parent
dae74a19d3
commit
43d47686c5
@ -67,7 +67,7 @@ def decimal2string(d):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
# Ensure that the provided string can actually be converted to a float
|
# Ensure that the provided string can actually be converted to a float
|
||||||
f = float(d)
|
float(d)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
# Not a number
|
# Not a number
|
||||||
return str(d)
|
return str(d)
|
||||||
@ -75,7 +75,7 @@ def decimal2string(d):
|
|||||||
s = str(d)
|
s = str(d)
|
||||||
|
|
||||||
# Return entire number if there is no decimal place
|
# Return entire number if there is no decimal place
|
||||||
if not '.' in s:
|
if '.' not in s:
|
||||||
return s
|
return s
|
||||||
|
|
||||||
return s.rstrip("0").rstrip(".")
|
return s.rstrip("0").rstrip(".")
|
||||||
|
Loading…
Reference in New Issue
Block a user