Allow pools to be already created, fetch them after the draw if necessary

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello 2024-03-30 22:25:08 +01:00
parent 572a6c3299
commit 30b9a73df8
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 1 additions and 1 deletions

View File

@ -347,7 +347,7 @@ class Pool(models.Model):
Translates this Pool instance in a :model:`participation.Pool` instance, with the passage orders.
"""
# Create the pool
self.associated_pool = await PPool.objects.acreate(
self.associated_pool, _created = await PPool.objects.aget_or_create(
tournament=self.round.draw.tournament,
round=self.round.number,
letter=self.letter,