From 30b9a73df8864a9d68060dad21b05c1c34e038d1 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Sat, 30 Mar 2024 22:25:08 +0100 Subject: [PATCH] Allow pools to be already created, fetch them after the draw if necessary Signed-off-by: Emmy D'Anello --- draw/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draw/models.py b/draw/models.py index d53cc20..7270f9e 100644 --- a/draw/models.py +++ b/draw/models.py @@ -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,