From b154c4985d8b0981860dc82d1db7712adb6048f3 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Tue, 28 Mar 2023 20:57:46 +0200 Subject: [PATCH] Fix duplicate problem check 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 0e6d10c..85a59b3 100644 --- a/draw/consumers.py +++ b/draw/consumers.py @@ -370,7 +370,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer): while True: problem = randint(1, settings.PROBLEM_COUNT) if await TeamDraw.objects.filter(participation_id=td.participation_id, - round__tournament=self.tournament, + round__draw__tournament=self.tournament, round__number=1).aexists(): continue if await pool.teamdraw_set.filter(accepted=problem).acount() < (2 if pool.size == 5 else 1):