1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-26 04:22:23 +00:00

Syntheses are working

This commit is contained in:
Yohann D'ANELLO 2020-05-20 15:50:44 +02:00
parent 495f42e594
commit 70f391420c

View File

@ -538,10 +538,12 @@ class SynthesesOrgaListView(OrgaMixin, SingleTableView):
qs = super().get_queryset()
if not self.request.user.admin:
if self.request.user in Tournament.get_final().organizers.all():
qs = qs.filter(Q(team__tournament__organizers=self.request.user) | Q(pools__juries=self.request.user)
qs = qs.filter(Q(team__tournament__organizers=self.request.user)
| Q(team__pools__juries=self.request.user)
| Q(final=True))
else:
qs = qs.filter(Q(team__tournament__organizers=self.request.user) | Q(pools__juries=self.request.user))
qs = qs.filter(Q(team__tournament__organizers=self.request.user)
| Q(team__pools__juries=self.request.user))
return qs.order_by('final', 'team__tournament__date_start', 'team__tournament__name', 'team__trigram',
'round', 'source',).distinct()