1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-24 19:02:23 +00:00

Fix information display for participants in 5-teams pools

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2024-04-18 15:07:15 +02:00
parent adc4634f3e
commit 3e24e10780
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -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 = _("<p>The solutions draw is ended. You can check the result on "
"<a href='{draw_url}'>this page</a>.</p>"
@ -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 = _("<p>For the second round, you will defend "
"<a href='{solution_url}'>your solution of the problem {problem}</a>.</p>")