Commit 3eac1fa4 authored by Yusei Tahara's avatar Yusei Tahara

precision may be None.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34260 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b189aa17
......@@ -67,7 +67,9 @@ class RoundingModel(Predicate):
decimal_rounding_option not in ROUNDING_OPTION_DICT):
raise ValueError, 'Decimal rounding option must be selected.'
def rounding_method(value, decimal_exponent, precision):
if decimal_exponent is None and precision is not None:
if precision is None:
precision = 0
if decimal_exponent is None:
if precision > 0:
decimal_exponent = '1.' + '0' * precision
else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment