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

Adapt the random draw for the next rounds of ETEAM

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello
2024-07-09 13:26:39 +02:00
parent 6b7d52c79b
commit 2c4de8cec3
4 changed files with 106 additions and 57 deletions

View File

@ -82,7 +82,7 @@ class Draw(models.Model):
elif self.current_round.current_pool.current_team is None:
return 'DICE_ORDER_POULE'
elif self.current_round.current_pool.current_team.accepted is not None:
if self.current_round.number == 1:
if self.current_round.number < settings.NB_ROUNDS:
# The last step can be the last problem acceptation after the first round
# only for the final between the two rounds
return 'WAITING_FINAL'
@ -205,7 +205,7 @@ class Round(models.Model):
current_pool = models.ForeignKey(
'Pool',
on_delete=models.CASCADE,
on_delete=models.SET_NULL,
null=True,
default=None,
related_name='+',