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:
parent
572a6c3299
commit
30b9a73df8
|
@ -347,7 +347,7 @@ class Pool(models.Model):
|
||||||
Translates this Pool instance in a :model:`participation.Pool` instance, with the passage orders.
|
Translates this Pool instance in a :model:`participation.Pool` instance, with the passage orders.
|
||||||
"""
|
"""
|
||||||
# Create the pool
|
# 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,
|
tournament=self.round.draw.tournament,
|
||||||
round=self.round.number,
|
round=self.round.number,
|
||||||
letter=self.letter,
|
letter=self.letter,
|
||||||
|
|
Loading…
Reference in New Issue