1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-25 19:02:33 +00:00

Fix pools for organizers, broken links

This commit is contained in:
Yohann D'ANELLO 2020-05-05 13:32:48 +02:00
parent cb7c23fd68
commit ecbbe46420

View File

@ -447,7 +447,7 @@ class PoolDetailView(LoginRequiredMixin, DetailView):
qs = super().get_queryset() qs = super().get_queryset()
user = self.request.user user = self.request.user
if not user.admin and user.organizes: if not user.admin and user.organizes:
qs = qs.filter(Q(juries=user) | Q(solutions__tournament__organizers=user)) qs = qs.filter(Q(juries=user) | Q(teams__tournament__organizers=user))
elif user.participates: elif user.participates:
qs = qs.filter(teams=user.team) qs = qs.filter(teams=user.team)
return qs.distinct() return qs.distinct()