From 51eaeed4339a98495eb0f2f5189fa8bdef80fe7c Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 12 Feb 2025 14:58:00 +0100 Subject: 🐛 templates: fix float_format round (refs #6172) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/utils_secretary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ishtar_common/utils_secretary.py b/ishtar_common/utils_secretary.py index fc6975fc9..917abdeaa 100644 --- a/ishtar_common/utils_secretary.py +++ b/ishtar_common/utils_secretary.py @@ -51,7 +51,7 @@ def float_format(value): return "" locale.setlocale(locale.LC_ALL, "fr_FR.UTF-8") if int(value) != value: - value = int(value * 100)/100 + value = float(f"{value:.2f}") return f"{value:n}" -- cgit v1.2.3