fix: broken distribution chart when number format is set to dot-comma

This commit is contained in:
Herculino Trotta
2025-06-29 01:31:43 -03:00
parent e544d7068b
commit b27633a28e

View File

@@ -5,7 +5,7 @@ from django.utils.formats import get_format as original_get_format
def get_format(format_type=None, lang=None, use_l10n=None):
user = get_current_user()
if user and user.is_authenticated and hasattr(user, "settings"):
if user and user.is_authenticated and hasattr(user, "settings") and use_l10n:
user_settings = user.settings
if format_type == "THOUSAND_SEPARATOR":
number_format = getattr(user_settings, "number_format", None)