1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-25 05:42:23 +00:00

Cancel choose problem

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2023-04-05 19:40:47 +02:00
parent 1f6ce072bf
commit f41b2e16ab
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -962,8 +962,19 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
'round': r.number,
'team': td.participation.team.trigram,
'problem': td.accepted})
elif state == 'WAITING_DRAW_PROBLEM':
pass
elif state == 'WAITING_CHOOSE_PROBLEM':
td = self.tournament.draw.current_round.current_pool.current_team
td.purposed = None
await td.asave()
await self.channel_layer.group_send(f"team-{td.participation.team.trigram}",
{'type': 'draw.buttons_visibility', 'visible': False})
await self.channel_layer.group_send(f"volunteer-{self.tournament.id}",
{'type': 'draw.buttons_visibility', 'visible': False})
await self.channel_layer.group_send(f"team-{td.participation.team.trigram}",
{'type': 'draw.box_visibility', 'visible': True})
await self.channel_layer.group_send(f"volunteer-{self.tournament.id}",
{'type': 'draw.box_visibility', 'visible': True})
await self.channel_layer.group_send(f"tournament-{self.tournament.id}",
{'type': 'draw.set_info', 'draw': self.tournament.draw})