Fix duplicate problem check

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2023-03-28 20:57:46 +02:00
parent ac039c1073
commit b154c4985d
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 1 additions and 1 deletions

View File

@ -370,7 +370,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
while True: while True:
problem = randint(1, settings.PROBLEM_COUNT) problem = randint(1, settings.PROBLEM_COUNT)
if await TeamDraw.objects.filter(participation_id=td.participation_id, if await TeamDraw.objects.filter(participation_id=td.participation_id,
round__tournament=self.tournament, round__draw__tournament=self.tournament,
round__number=1).aexists(): round__number=1).aexists():
continue continue
if await pool.teamdraw_set.filter(accepted=problem).acount() < (2 if pool.size == 5 else 1): if await pool.teamdraw_set.filter(accepted=problem).acount() < (2 if pool.size == 5 else 1):