Use decimal2string instead of normalize

This commit is contained in:
Oliver Walters 2020-02-12 10:08:35 +11:00
parent 520b8d7b2b
commit d04fb0d826

View File

@ -1243,12 +1243,8 @@ class BomItem(models.Model):
pmin, pmax = prange pmin, pmax = prange
# remove trailing zeros
pmin = pmin.normalize()
pmax = pmax.normalize()
if pmin == pmax: if pmin == pmax:
return str(pmin) return decimal2string(pmin)
# Convert to better string representation # Convert to better string representation
pmin = decimal2string(pmin) pmin = decimal2string(pmin)