1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-21 05:58:25 +02:00

Use more complex calculus to mix teams for the second day

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello
2023-03-31 17:15:34 +02:00
parent cf8892ee1a
commit 14505260ff
3 changed files with 51 additions and 40 deletions

View File

@ -282,7 +282,7 @@ class Tournament(models.Model):
def best_format(self):
n = len(self.participations.filter(valid=True).all())
fmt = [n] if n <= 5 else [3] * (n // 3 - 1) + [3 + n % 3]
return '+'.join(map(str, fmt))
return '+'.join(map(str, sorted(fmt, reverse=True)))
def get_absolute_url(self):