From aef53b18283f881c27546d2fba287f123a107f65 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Wed, 13 Mar 2024 17:16:32 -0400 Subject: [PATCH] paperwork: Fix department_certifications shop lead check parentheses are important! Also removed the superuser override, as that was hiding the issue for my account --- paperwork/views.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/paperwork/views.py b/paperwork/views.py index 10d24eb..1136b7b 100644 --- a/paperwork/views.py +++ b/paperwork/views.py @@ -57,11 +57,7 @@ class MemberCertificationListView(ListView): @login_required def department_certifications(request): - if request.user.is_superuser: - departments = Department.objects.prefetch_related( - "shop_lead_flag__members" - ).all() - elif member := Member.from_user(request.user) is not None: + if (member := Member.from_user(request.user)) is not None: departments = Department.objects.filter_by_shop_lead(member) else: departments = []