|
|
|
@ -606,6 +606,7 @@ class Tournament(models.Model): |
|
|
|
matches.extend(first_round.get_matches_recursive(True)) |
|
|
|
matches.extend(first_round.get_matches_recursive(True)) |
|
|
|
else: |
|
|
|
else: |
|
|
|
current_round = self.round_to_show() |
|
|
|
current_round = self.round_to_show() |
|
|
|
|
|
|
|
print(f'current_round = {current_round.index}') |
|
|
|
if current_round: |
|
|
|
if current_round: |
|
|
|
all_upper_matches_are_over = current_round.all_matches_are_over() |
|
|
|
all_upper_matches_are_over = current_round.all_matches_are_over() |
|
|
|
if all_upper_matches_are_over is False: |
|
|
|
if all_upper_matches_are_over is False: |
|
|
|
@ -614,16 +615,20 @@ class Tournament(models.Model): |
|
|
|
# Add full matches from the next rounds |
|
|
|
# Add full matches from the next rounds |
|
|
|
next_round = self.round_for_index(current_round.index - 1) |
|
|
|
next_round = self.round_for_index(current_round.index - 1) |
|
|
|
if next_round: |
|
|
|
if next_round: |
|
|
|
|
|
|
|
print('next round') |
|
|
|
matches.extend(next_round.get_matches_recursive(True)) |
|
|
|
matches.extend(next_round.get_matches_recursive(True)) |
|
|
|
|
|
|
|
|
|
|
|
if all_upper_matches_are_over is True: |
|
|
|
if all_upper_matches_are_over is True: |
|
|
|
|
|
|
|
print('all_upper_matches_are_over') |
|
|
|
matches.extend(current_round.get_matches_recursive(True)) |
|
|
|
matches.extend(current_round.get_matches_recursive(True)) |
|
|
|
|
|
|
|
|
|
|
|
# Add matches from the previous round or group_stages |
|
|
|
# Add matches from the previous round or group_stages |
|
|
|
previous_round = self.round_for_index(current_round.index + 1) |
|
|
|
previous_round = self.round_for_index(current_round.index + 1) |
|
|
|
if previous_round: |
|
|
|
if previous_round: |
|
|
|
|
|
|
|
print('previous_round') |
|
|
|
matches.extend(previous_round.get_matches_recursive(True)) |
|
|
|
matches.extend(previous_round.get_matches_recursive(True)) |
|
|
|
else: |
|
|
|
else: |
|
|
|
|
|
|
|
print('group_stages') |
|
|
|
group_stages = [gs.live_group_stages() for gs in self.last_group_stage_step()] |
|
|
|
group_stages = [gs.live_group_stages() for gs in self.last_group_stage_step()] |
|
|
|
|
|
|
|
|
|
|
|
return matches, group_stages |
|
|
|
return matches, group_stages |
|
|
|
|