1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-02-24 14:21:19 +00:00

Compare commits

..

No commits in common. "bf5c673739f0e317238b6a38f7ab34368518a74b" and "630633bab48f3094bf4cd9618a203ce51089e850" have entirely different histories.

View File

@ -5,7 +5,6 @@ from collections import OrderedDict
import json import json
from random import randint, shuffle from random import randint, shuffle
from asgiref.sync import sync_to_async
from channels.generic.websocket import AsyncJsonWebsocketConsumer from channels.generic.websocket import AsyncJsonWebsocketConsumer
from django.conf import settings from django.conf import settings
from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.models import ContentType
@ -980,17 +979,15 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
if not await Draw.objects.filter(tournament=self.tournament).aexists(): if not await Draw.objects.filter(tournament=self.tournament).aexists():
return await self.alert(_("The draw has not started yet."), 'danger') 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 # Export each exportable pool
async for r in self.tournament.draw.round_set.all(): async for r in self.tournament.draw.round_set.all():
async for pool in r.pool_set.all(): async for pool in r.pool_set.all():
if await pool.is_exportable(): if await pool.is_exportable():
await pool.export() await pool.export()
await sync_to_async(self.tournament.update_ranking_spreadsheet)() await self.channel_layer.group_send(f"volunteer-{self.tournament.id}",
{'tid': self.tournament_id, 'type': 'draw.export_visibility',
'visible': False})
@ensure_orga @ensure_orga
async def continue_final(self, **kwargs): async def continue_final(self, **kwargs):