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

Hide draw export button sooner to avoid that double exports

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2024-03-31 13:45:32 +02:00
parent 630633bab4
commit a62e906b0e
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -979,16 +979,16 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
if not await Draw.objects.filter(tournament=self.tournament).aexists():
return await self.alert(_("The draw has not started yet."), 'danger')
await self.channel_layer.group_send(f"volunteer-{self.tournament.id}",
{'tid': self.tournament_id, 'type': 'draw.export_visibility',
'visible': False})
# Export each exportable pool
async for r in self.tournament.draw.round_set.all():
async for pool in r.pool_set.all():
if await pool.is_exportable():
await pool.export()
await self.channel_layer.group_send(f"volunteer-{self.tournament.id}",
{'tid': self.tournament_id, 'type': 'draw.export_visibility',
'visible': False})
@ensure_orga
async def continue_final(self, **kwargs):
"""