paperwork: Fix department_certifications shop lead check
parentheses are important! Also removed the superuser override, as that was hiding the issue for my account
This commit is contained in:
parent
5aadcccb2c
commit
aef53b1828
@ -57,11 +57,7 @@ class MemberCertificationListView(ListView):
|
|||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def department_certifications(request):
|
def department_certifications(request):
|
||||||
if request.user.is_superuser:
|
if (member := Member.from_user(request.user)) is not None:
|
||||||
departments = Department.objects.prefetch_related(
|
|
||||||
"shop_lead_flag__members"
|
|
||||||
).all()
|
|
||||||
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:
|
||||||
departments = []
|
departments = []
|
||||||
|
Loading…
Reference in New Issue
Block a user