mirror of https://github.com/django/django.git
Removed unused code in django.db.backends.utils.format_number().
This commit is contained in:
parent
0e64e046a4
commit
4009e1f2ab
|
@ -225,7 +225,6 @@ def format_number(value, max_digits, decimal_places):
|
|||
"""
|
||||
if value is None:
|
||||
return None
|
||||
if isinstance(value, decimal.Decimal):
|
||||
context = decimal.getcontext().copy()
|
||||
if max_digits is not None:
|
||||
context.prec = max_digits
|
||||
|
@ -235,9 +234,6 @@ def format_number(value, max_digits, decimal_places):
|
|||
context.traps[decimal.Rounded] = 1
|
||||
value = context.create_decimal(value)
|
||||
return "{:f}".format(value)
|
||||
if decimal_places is not None:
|
||||
return "%.*f" % (decimal_places, value)
|
||||
return "{:f}".format(value)
|
||||
|
||||
|
||||
def strip_quotes(table_name):
|
||||
|
|
Loading…
Reference in New Issue