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}.

")