From 72e1377b150882d8db821cc0c0a9fb52fe7866a2 Mon Sep 17 00:00:00 2001 From: didayolo Date: Thu, 30 Apr 2026 12:36:54 +0200 Subject: [PATCH 1/2] Fix show counts in Django admin --- src/apps/competitions/admin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/apps/competitions/admin.py b/src/apps/competitions/admin.py index 98cb64147..dc5f489c0 100644 --- a/src/apps/competitions/admin.py +++ b/src/apps/competitions/admin.py @@ -25,6 +25,10 @@ def choices(self, changelist): ) yield all_choice + def get_facet_counts(self, pk_attname, filtered_qs): + # Text-input filters have no predefined choices to count (Django 5.0+ facets). + return {} + class SubmissionsCountFilter(InputFilter): # Human-readable title which will be displayed in the From 92bed501ccaee5132e89f5fe624e24d7ba990c42 Mon Sep 17 00:00:00 2001 From: didayolo Date: Thu, 30 Apr 2026 15:17:30 +0200 Subject: [PATCH 2/2] Fix Users show counts --- src/apps/profiles/admin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/apps/profiles/admin.py b/src/apps/profiles/admin.py index a3ad7bfe8..4a9ba7ca5 100644 --- a/src/apps/profiles/admin.py +++ b/src/apps/profiles/admin.py @@ -25,6 +25,10 @@ def choices(self, changelist): ) yield all_choice + def get_facet_counts(self, pk_attname, filtered_qs): + # Text-input filters have no predefined choices to count (Django 5.0+ facets). + return {} + class QuotaFilter(InputFilter): # Human-readable title which will be displayed in the