mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #34272 -- Fixed floatformat crash on zero with trailing zeros to zero decimal places.
Regression in 08c5a78726.
Thanks Andrii Lahuta for the report.
This commit is contained in:
committed by
Mariusz Felisiak
parent
39f83765e1
commit
4b066bde69
@@ -168,7 +168,7 @@ def floatformat(text, arg=-1):
|
||||
except (ValueError, OverflowError, InvalidOperation):
|
||||
return input_val
|
||||
|
||||
if not m and p < 0:
|
||||
if not m and p <= 0:
|
||||
return mark_safe(
|
||||
formats.number_format(
|
||||
"%d" % (int(d)),
|
||||
|
||||
Reference in New Issue
Block a user