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 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