From ac2b2ba2422786bebded3ced40859ed0f94612de Mon Sep 17 00:00:00 2001 From: Sicherhaven Date: Fri, 3 Apr 2026 17:41:45 +0530 Subject: [PATCH] fix(users): add include_all param to UserListView for contributor search Superusers (admins) were excluded by the is_superuser=False filter, making them unsearchable in the contributor picker. Pass include_all=1 to bypass this filter when searching for event contributors. --- admin_api/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin_api/views.py b/admin_api/views.py index 69a87c6..b13e7e0 100644 --- a/admin_api/views.py +++ b/admin_api/views.py @@ -585,7 +585,8 @@ class UserListView(APIView): from django.contrib.auth import get_user_model from django.db.models import Q User = get_user_model() - qs = User.objects.filter(is_superuser=False) + include_all = request.query_params.get('include_all', '0') == '1' + qs = User.objects.all() if include_all else User.objects.filter(is_superuser=False) # Server-side search search = request.query_params.get('search', '').strip()