|
|
|
@ -111,9 +111,9 @@ class Match(SideStoreModel): |
|
|
|
|
|
|
|
|
|
|
|
previous_round = None |
|
|
|
previous_round = None |
|
|
|
# Check if the next index is within the bounds of the rounds array |
|
|
|
# Check if the next index is within the bounds of the rounds array |
|
|
|
previous_round = self.round.tournament.round_set.filter(index=previous_index, parent = self.round.parent).first() |
|
|
|
previous_round = self.round.tournament.rounds.filter(index=previous_index, parent = self.round.parent).first() |
|
|
|
if previous_round is None and self.round.parent is not None: |
|
|
|
if previous_round is None and self.round.parent is not None: |
|
|
|
previous_round = self.round.tournament.round_set.filter(id=self.round.parent.id).first() |
|
|
|
previous_round = self.round.tournament.rounds.filter(id=self.round.parent.id).first() |
|
|
|
return previous_round |
|
|
|
return previous_round |
|
|
|
return None |
|
|
|
return None |
|
|
|
|
|
|
|
|
|
|
|
@ -133,7 +133,7 @@ class Match(SideStoreModel): |
|
|
|
previous_round = self.get_loser_previous_round() |
|
|
|
previous_round = self.get_loser_previous_round() |
|
|
|
match = None |
|
|
|
match = None |
|
|
|
if previous_round: |
|
|
|
if previous_round: |
|
|
|
matches = previous_round.match_set.all() # Retrieve the QuerySet |
|
|
|
matches = previous_round.matches.all() # Retrieve the QuerySet |
|
|
|
match_index = self.index * 2 + 1 |
|
|
|
match_index = self.index * 2 + 1 |
|
|
|
if top == False: |
|
|
|
if top == False: |
|
|
|
match_index += 1 |
|
|
|
match_index += 1 |
|
|
|
@ -254,7 +254,7 @@ class Match(SideStoreModel): |
|
|
|
team = self.default_live_team(names) |
|
|
|
team = self.default_live_team(names) |
|
|
|
teams.append(existing_team) |
|
|
|
teams.append(existing_team) |
|
|
|
teams.append(team) |
|
|
|
teams.append(team) |
|
|
|
elif (self.round.parent is None and self.round.tournament.round_set.filter(parent__isnull=True, group_stage_loser_bracket=False).count() - 1 == self.round.index): |
|
|
|
elif (self.round.parent is None and self.round.tournament.rounds.filter(parent__isnull=True, group_stage_loser_bracket=False).count() - 1 == self.round.index): |
|
|
|
match_index_within_round = self.index - (int(2 ** self.round.index) - 1) |
|
|
|
match_index_within_round = self.index - (int(2 ** self.round.index) - 1) |
|
|
|
names = ["Qualifié", ''] |
|
|
|
names = ["Qualifié", ''] |
|
|
|
team = self.default_live_team(names) |
|
|
|
team = self.default_live_team(names) |
|
|
|
|