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
1 changed files with 1 additions and 1 deletions

View File

@ -447,7 +447,7 @@ class PoolDetailView(LoginRequiredMixin, DetailView):
qs = super().get_queryset()
user = self.request.user
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:
qs = qs.filter(teams=user.team)
return qs.distinct()