|
|
|
|
@ -164,6 +164,7 @@ class Tournament(models.Model): |
|
|
|
|
initial_weight = team_registration.initial_weight() |
|
|
|
|
date = team_registration.registration_date |
|
|
|
|
team = TeamList(names, weight, date, initial_weight, team_registration.logo) |
|
|
|
|
team.set_stage("Attente") |
|
|
|
|
teams.append(team) |
|
|
|
|
if team_registration.wild_card_bracket: |
|
|
|
|
wildcard_bracket.append(team) |
|
|
|
|
@ -172,6 +173,9 @@ class Tournament(models.Model): |
|
|
|
|
else: |
|
|
|
|
complete_teams.append(team) |
|
|
|
|
|
|
|
|
|
if len(teams) < self.team_count: |
|
|
|
|
return teams |
|
|
|
|
|
|
|
|
|
seeds_count = min(self.team_count, len(teams)) - self.group_stage_count * self.teams_per_group_stage - len(wildcard_bracket) |
|
|
|
|
group_stage_members_count = self.group_stage_count * self.teams_per_group_stage - len(wildcard_group_stage) |
|
|
|
|
if group_stage_members_count < 0: |
|
|
|
|
|