From 3e24e1078073f0d0575971b96e58f27c5d2de30b Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Thu, 18 Apr 2024 15:07:15 +0200 Subject: [PATCH] Fix information display for participants in 5-teams pools Signed-off-by: Emmy D'Anello --- participation/models.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/participation/models.py b/participation/models.py index fa1085b..389e149 100644 --- a/participation/models.py +++ b/participation/models.py @@ -822,10 +822,9 @@ class Participation(models.Model): 'content': content, }) elif timezone.now() <= tournament.syntheses_first_phase_limit + timedelta(hours=2): - pool = self.pools.get(round=1, tournament=self.tournament) - defender_passage = pool.passages.get(defender=self) - opponent_passage = pool.passages.get(opponent=self) - reporter_passage = pool.passages.get(reporter=self) + defender_passage = Passage.objects.get(pool__tournament=self.tournament, pool__round=1, defender=self) + opponent_passage = Passage.objects.get(pool__tournament=self.tournament, pool__round=1, opponent=self) + reporter_passage = Passage.objects.get(pool__tournament=self.tournament, pool__round=1, reporter=self) defender_text = _("

The solutions draw is ended. You can check the result on " "this page.

" @@ -868,9 +867,9 @@ class Participation(models.Model): }) elif timezone.now() <= tournament.syntheses_second_phase_limit + timedelta(hours=2): pool = self.pools.get(round=2, tournament=tournament) - defender_passage = pool.passages.get(defender=self) - opponent_passage = pool.passages.get(opponent=self) - reporter_passage = pool.passages.get(reporter=self) + defender_passage = Passage.objects.get(pool__tournament=self.tournament, pool__round=2, defender=self) + opponent_passage = Passage.objects.get(pool__tournament=self.tournament, pool__round=2, opponent=self) + reporter_passage = Passage.objects.get(pool__tournament=self.tournament, pool__round=2, reporter=self) defender_text = _("

For the second round, you will defend " "your solution of the problem {problem}.

")