From dfc45dbc93e8cff025040a5b45fc9702816efcec Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Tue, 4 Apr 2023 21:21:55 +0200 Subject: [PATCH] A team can't accept a problem that was previously *accepted* not the last purposed Signed-off-by: Emmy D'Anello --- draw/consumers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draw/consumers.py b/draw/consumers.py index bf37dfc..a365db7 100644 --- a/draw/consumers.py +++ b/draw/consumers.py @@ -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):