1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-25 17:02:28 +00:00

A team can't accept a problem that was previously *accepted* not the last purposed

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2023-04-04 21:21:55 +02:00
parent 31f5373652
commit dfc45dbc93
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -541,7 +541,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
if await TeamDraw.objects.filter(participation_id=td.participation_id,
round__draw__tournament=self.tournament,
round__number=1,
purposed=problem).aexists():
accepted=problem).aexists():
continue
# Check that the problem is not already chosen once (or twice for a 5-teams pool)
if await pool.teamdraw_set.filter(accepted=problem).acount() < (2 if pool.size == 5 else 1):