Skip to content

Commit

Permalink
Vis kun egne afdelinger på deltager admin side
Browse files Browse the repository at this point in the history
  • Loading branch information
rasmusselsmark committed Aug 20, 2023
1 parent 40af154 commit de49f11
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions members/admin/activityparticipant_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from members.models import (
Activity,
AdminUserInformation,
Department,
Union,
)

Expand All @@ -23,7 +22,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):
Expand Down

0 comments on commit de49f11

Please sign in to comment.