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:
parent
630633bab4
commit
a62e906b0e
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue