From a62e906b0ea919d73657d6bb9ce56151cfc43a5f Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Sun, 31 Mar 2024 13:45:32 +0200 Subject: [PATCH] Hide draw export button sooner to avoid that double exports Signed-off-by: Emmy D'Anello --- draw/consumers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/draw/consumers.py b/draw/consumers.py index fdb921d..8d3189f 100644 --- a/draw/consumers.py +++ b/draw/consumers.py @@ -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): """