From 2bfbbfd4ba4cf5d45bf8332a938f0c20f011d262 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Wed, 20 Nov 2024 18:08:25 +0100 Subject: [PATCH] Possible fix for #3230 --- cps/jinjia.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/jinjia.py b/cps/jinjia.py index 3db3e88a..ae1945a4 100644 --- a/cps/jinjia.py +++ b/cps/jinjia.py @@ -111,7 +111,7 @@ def yesno(value, yes, no): @jinjia.app_template_filter('formatfloat') def formatfloat(value, decimals=1): - if not value: + if not value or (isinstance(value, str) and not value.is_numeric()): return value formated_value = ('{0:.' + str(decimals) + 'f}').format(value) if formated_value.endswith('.' + "0" * decimals):