|
|
|
|
@ -167,19 +167,23 @@ class Match(models.Model): |
|
|
|
|
elif len(team_scores) == 1: |
|
|
|
|
# Only one team score, handle missing one |
|
|
|
|
existing_team = team_scores[0].live_team(self) |
|
|
|
|
|
|
|
|
|
if previous_top_match and previous_top_match.disabled == False and previous_top_match.end_date is None: |
|
|
|
|
names = [f"Gagnants du {previous_top_match.computed_name()}", ''] |
|
|
|
|
team = self.default_live_team(names) |
|
|
|
|
teams.append(team) |
|
|
|
|
if self.round and self.round.parent: |
|
|
|
|
teams.append(existing_team) |
|
|
|
|
elif previous_bottom_match: |
|
|
|
|
names = [f"Gagnants du {previous_bottom_match.computed_name()}", ''] |
|
|
|
|
team = self.default_live_team(names) |
|
|
|
|
elif (self.group_stage): |
|
|
|
|
teams.append(existing_team) |
|
|
|
|
teams.append(team) |
|
|
|
|
else: |
|
|
|
|
teams.append(existing_team) |
|
|
|
|
if previous_top_match and previous_top_match.disabled == False and previous_top_match.end_date is None: |
|
|
|
|
names = [f"Gagnants du {previous_top_match.computed_name()}", ''] |
|
|
|
|
team = self.default_live_team(names) |
|
|
|
|
teams.append(team) |
|
|
|
|
teams.append(existing_team) |
|
|
|
|
elif previous_bottom_match: |
|
|
|
|
names = [f"Gagnants du {previous_bottom_match.computed_name()}", ''] |
|
|
|
|
team = self.default_live_team(names) |
|
|
|
|
teams.append(existing_team) |
|
|
|
|
teams.append(team) |
|
|
|
|
else: |
|
|
|
|
teams.append(existing_team) |
|
|
|
|
else: |
|
|
|
|
# Both team scores present |
|
|
|
|
teams.extend([team_score.live_team(self) for team_score in team_scores]) |
|
|
|
|
|