mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-02-26 21:46:28 +00:00
Compare commits
2 Commits
ca7cf5987c
...
dfc45dbc93
Author | SHA1 | Date | |
---|---|---|---|
|
dfc45dbc93 | ||
|
31f5373652 |
@ -509,7 +509,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
|
|||||||
{'type': 'draw.box_visibility', 'visible': True})
|
{'type': 'draw.box_visibility', 'visible': True})
|
||||||
|
|
||||||
# Notify the team that it can draw a problem
|
# Notify the team that it can draw a problem
|
||||||
self.channel_layer.group_send(f"team-{tds[0].participation.team.trigram}",
|
await self.channel_layer.group_send(f"team-{tds[0].participation.team.trigram}",
|
||||||
{'type': 'draw.notify', 'title': "À votre tour !",
|
{'type': 'draw.notify', 'title': "À votre tour !",
|
||||||
'body': "C'est à vous de tirer un nouveau problème !"})
|
'body': "C'est à vous de tirer un nouveau problème !"})
|
||||||
|
|
||||||
@ -541,7 +541,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
|
|||||||
if await TeamDraw.objects.filter(participation_id=td.participation_id,
|
if await TeamDraw.objects.filter(participation_id=td.participation_id,
|
||||||
round__draw__tournament=self.tournament,
|
round__draw__tournament=self.tournament,
|
||||||
round__number=1,
|
round__number=1,
|
||||||
purposed=problem).aexists():
|
accepted=problem).aexists():
|
||||||
continue
|
continue
|
||||||
# Check that the problem is not already chosen once (or twice for a 5-teams pool)
|
# Check that the problem is not already chosen once (or twice for a 5-teams pool)
|
||||||
if await pool.teamdraw_set.filter(accepted=problem).acount() < (2 if pool.size == 5 else 1):
|
if await pool.teamdraw_set.filter(accepted=problem).acount() < (2 if pool.size == 5 else 1):
|
||||||
@ -631,7 +631,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
|
|||||||
{'type': 'draw.box_visibility', 'visible': True})
|
{'type': 'draw.box_visibility', 'visible': True})
|
||||||
|
|
||||||
# Notify the team that it can draw a problem
|
# Notify the team that it can draw a problem
|
||||||
self.channel_layer.group_send(f"team-{new_trigram}",
|
await self.channel_layer.group_send(f"team-{new_trigram}",
|
||||||
{'type': 'draw.notify', 'title': "À votre tour !",
|
{'type': 'draw.notify', 'title': "À votre tour !",
|
||||||
'body': "C'est à vous de tirer un nouveau problème !"})
|
'body': "C'est à vous de tirer un nouveau problème !"})
|
||||||
else:
|
else:
|
||||||
@ -684,7 +684,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
|
|||||||
await self.channel_layer.group_send(f"team-{td.participation.team.trigram}",
|
await self.channel_layer.group_send(f"team-{td.participation.team.trigram}",
|
||||||
{'type': 'draw.dice_visibility', 'visible': True})
|
{'type': 'draw.dice_visibility', 'visible': True})
|
||||||
# Notify the team that it can draw a dice
|
# Notify the team that it can draw a dice
|
||||||
self.channel_layer.group_send(f"team-{td.participation.team.trigram}",
|
await self.channel_layer.group_send(f"team-{td.participation.team.trigram}",
|
||||||
{'type': 'draw.notify', 'title': "À votre tour !",
|
{'type': 'draw.notify', 'title': "À votre tour !",
|
||||||
'body': "C'est à vous de lancer le dé !"})
|
'body': "C'est à vous de lancer le dé !"})
|
||||||
|
|
||||||
@ -706,7 +706,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
|
|||||||
{'type': 'draw.dice', 'team': participation.team.trigram, 'result': None})
|
{'type': 'draw.dice', 'team': participation.team.trigram, 'result': None})
|
||||||
|
|
||||||
# Notify the team that it can draw a dice
|
# Notify the team that it can draw a dice
|
||||||
self.channel_layer.group_send(f"team-{participation.team.trigram}",
|
await self.channel_layer.group_send(f"team-{participation.team.trigram}",
|
||||||
{'type': 'draw.notify', 'title': "À votre tour !",
|
{'type': 'draw.notify', 'title': "À votre tour !",
|
||||||
'body': "C'est à vous de lancer le dé !"})
|
'body': "C'est à vous de lancer le dé !"})
|
||||||
|
|
||||||
@ -818,7 +818,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
|
|||||||
{'type': 'draw.set_active', 'draw': self.tournament.draw})
|
{'type': 'draw.set_active', 'draw': self.tournament.draw})
|
||||||
|
|
||||||
# Notify the team that it can draw a problem
|
# Notify the team that it can draw a problem
|
||||||
self.channel_layer.group_send(f"team-{new_trigram}",
|
await self.channel_layer.group_send(f"team-{new_trigram}",
|
||||||
{'type': 'draw.notify', 'title': "À votre tour !",
|
{'type': 'draw.notify', 'title': "À votre tour !",
|
||||||
'body': "C'est à vous de tirer un nouveau problème !"})
|
'body': "C'est à vous de tirer un nouveau problème !"})
|
||||||
|
|
||||||
@ -896,7 +896,7 @@ class DrawConsumer(AsyncJsonWebsocketConsumer):
|
|||||||
{'type': 'draw.dice_visibility', 'visible': True})
|
{'type': 'draw.dice_visibility', 'visible': True})
|
||||||
|
|
||||||
# Notify the team that it can draw a problem
|
# Notify the team that it can draw a problem
|
||||||
self.channel_layer.group_send(f"team-{td.participation.team.trigram}",
|
await self.channel_layer.group_send(f"team-{td.participation.team.trigram}",
|
||||||
{'type': 'draw.notify', 'title': "À votre tour !",
|
{'type': 'draw.notify', 'title': "À votre tour !",
|
||||||
'body': "C'est à vous de tirer un nouveau problème !"})
|
'body': "C'est à vous de tirer un nouveau problème !"})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user