mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-25 05:02:23 +00:00
Teams can't select a same problem for the two days
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
5b1374bf1b
commit
fbaca32615
@ -369,6 +369,10 @@ 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__number=1).aexists():
|
||||
continue
|
||||
if await pool.teamdraw_set.filter(accepted=problem).acount() < (2 if pool.size == 5 else 1):
|
||||
break
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user