From 34043e278f8f6eed6acc2a05a5796970edb2da69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Dlouh=C3=BD?= Date: Tue, 22 Oct 2024 14:59:44 +0200 Subject: [PATCH 1/2] fix none choice in charts --- admin_tools_stats/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/admin_tools_stats/models.py b/admin_tools_stats/models.py index 7e4ec84..4740d91 100644 --- a/admin_tools_stats/models.py +++ b/admin_tools_stats/models.py @@ -1058,6 +1058,7 @@ def _get_dynamic_choices( choices.update( ((i, (i, fchoices[i] if i in fchoices else i)) for i in choices_queryset), ) + choices.update([("None", (None, "None"))]) if count_limit: choices.update( [("other", (other_choices_queryset, "other"))], From 51330db3c2a96347ed873db9d74ca97d88a9e525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Dlouh=C3=BD?= Date: Wed, 23 Oct 2024 10:24:43 +0200 Subject: [PATCH 2/2] fix none choice in charts --- admin_tools_stats/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin_tools_stats/models.py b/admin_tools_stats/models.py index 4740d91..e510925 100644 --- a/admin_tools_stats/models.py +++ b/admin_tools_stats/models.py @@ -1058,7 +1058,7 @@ def _get_dynamic_choices( choices.update( ((i, (i, fchoices[i] if i in fchoices else i)) for i in choices_queryset), ) - choices.update([("None", (None, "None"))]) + choices.update([("None", (None, None))]) if count_limit: choices.update( [("other", (other_choices_queryset, "other"))],