mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-25 03:40:31 +02:00
Add messages for better understanding
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -216,6 +216,14 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
|
||||
self.tournament.draw.current_round.current_pool = pool
|
||||
await sync_to_async(self.tournament.draw.current_round.save)()
|
||||
|
||||
msg = "Les résultats des dés sont les suivants : "
|
||||
msg += await sync_to_async(lambda: ", ".join(
|
||||
f"<strong>{td.participation.team.trigram}</strong> ({td.last_dice})"
|
||||
for td in self.tournament.draw.current_round.team_draws))()
|
||||
msg += ". L'ordre de passage et les compositions des différentes poules sont affiché⋅es sur le côté."
|
||||
self.tournament.draw.last_message = msg
|
||||
await sync_to_async(self.tournament.draw.save)()
|
||||
|
||||
await TeamDraw.objects.filter(round=self.tournament.draw.current_round).aupdate(last_dice=None)
|
||||
for td in tds:
|
||||
await self.channel_layer.group_send(
|
||||
@ -279,6 +287,9 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
|
||||
pool.current_team = tds[0]
|
||||
await sync_to_async(pool.save)()
|
||||
|
||||
self.tournament.draw.last_message = ""
|
||||
await sync_to_async(self.tournament.draw.save)()
|
||||
|
||||
await self.channel_layer.group_send(f"tournament-{self.tournament.id}",
|
||||
{'type': 'draw.set_info', 'draw': self.tournament.draw})
|
||||
await self.channel_layer.group_send(f"tournament-{self.tournament.id}",
|
||||
|
Reference in New Issue
Block a user