From 837800345b92e27cdfbbf0fdc7159f33f102b528 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Tue, 11 May 2021 17:06:49 +0200 Subject: [PATCH] Fix permissions for solutions for the final --- apps/registration/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/registration/views.py b/apps/registration/views.py index c20e05a..7a3424a 100644 --- a/apps/registration/views.py +++ b/apps/registration/views.py @@ -553,7 +553,8 @@ class SolutionView(LoginRequiredMixin, View): passage_participant_qs = Passage.objects.none() if not (user.registration.is_admin or user.registration.is_volunteer and user.registration - in solution.participation.tournament.organizers.all() + in (solution.participation.tournament + if not solution.final_solution else Tournament.final_tournament()).organizers.all() or user.registration.is_volunteer and Passage.objects.filter(Q(pool__juries=user.registration) | Q(pool__tournament__in=user.registration.organized_tournaments.all()),