paperwork: Fix typo in department certification list view

This commit is contained in:
Adam Goldsmith 2023-06-21 14:21:42 -04:00
parent a41fceaaf4
commit 9341bcba0e

View File

@ -33,7 +33,9 @@ class MemberCertificationListView(ListView):
@login_required @login_required
def department_certifications(request): def department_certifications(request):
if request.user.is_superuser: if request.user.is_superuser:
departments = Department.prefetch_related("shop_lead_flag__members").all() departments = Department.objects.prefetch_related(
"shop_lead_flag__members"
).all()
elif member := Member.from_user(request.user) is not None: elif member := Member.from_user(request.user) is not None:
departments = Department.objects.filter_by_shop_lead(member) departments = Department.objects.filter_by_shop_lead(member)
else: else: