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
1 changed files with 1 additions and 1 deletions

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):