1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #34098 -- Fixed loss of precision for Decimal values in floatformat filter.

Regression in 12f7928f5a.
This commit is contained in:
Vlastimil Zíma
2022-10-24 12:59:34 +02:00
committed by GitHub
parent 1d6948096f
commit 08c5a78726
2 changed files with 5 additions and 1 deletions

View File

@@ -151,7 +151,7 @@ def floatformat(text, arg=-1):
use_l10n = False
arg = arg[:-1] or -1
try:
input_val = repr(text)
input_val = str(text)
d = Decimal(input_val)
except InvalidOperation:
try: