1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-30 11:11:14 +02:00

Only display final selection after publishing results

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello
2024-04-07 12:09:31 +02:00
parent 1493df0078
commit 7a004596ca
2 changed files with 4 additions and 3 deletions

View File

@ -621,7 +621,8 @@ class TournamentDetailView(MultiTableMixin, DetailView):
context["available_notes_1"] = all(pool.results_available for pool in self.object.pools.filter(round=1).all())
context["available_notes_2"] = all(pool.results_available for pool in self.object.pools.filter(round=2).all())
if not self.object.final and notes and self.request.user.registration.is_volunteer:
if not self.object.final and notes and context["available_notes_2"] \
and self.request.user.registration.is_volunteer:
context["team_selectable_for_final"] = next(participation for participation, _note in sorted_notes
if not participation.final)