Compare commits
2 Commits
017daf94d7
...
9341bcba0e
Author | SHA1 | Date | |
---|---|---|---|
9341bcba0e | |||
a41fceaaf4 |
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user