diff --git a/members/admin/activityparticipant_admin.py b/members/admin/activityparticipant_admin.py index fb68f83e..aac9f9db 100644 --- a/members/admin/activityparticipant_admin.py +++ b/members/admin/activityparticipant_admin.py @@ -8,7 +8,6 @@ from members.models import ( Activity, AdminUserInformation, - Department, Union, ) @@ -22,7 +21,9 @@ class ActivityParticipantDepartmentFilter(admin.SimpleListFilter): def lookups(self, request, model_admin): return [ (str(department.pk), str(department)) - for department in Department.objects.all().order_by("name") + for department in AdminUserInformation.get_departments_admin( + request.user + ).order_by("name") ] def queryset(self, request, queryset):