|
|
|
@ -361,7 +361,7 @@ class Tournament(models.Model): |
|
|
|
live_matches = [match.live_match() for match in matches] |
|
|
|
live_matches = [match.live_match() for match in matches] |
|
|
|
return MatchGroup(name, live_matches) |
|
|
|
return MatchGroup(name, live_matches) |
|
|
|
|
|
|
|
|
|
|
|
def broadcasted_group_stages(self): |
|
|
|
def live_group_stages(self): |
|
|
|
group_stages = list(self.groupstage_set.all()) |
|
|
|
group_stages = list(self.groupstage_set.all()) |
|
|
|
group_stages.sort(key=lambda gs: gs.index) |
|
|
|
group_stages.sort(key=lambda gs: gs.index) |
|
|
|
return [gs.live_group_stages() for gs in group_stages] |
|
|
|
return [gs.live_group_stages() for gs in group_stages] |
|
|
|
@ -401,7 +401,7 @@ class Tournament(models.Model): |
|
|
|
group_stages = [] |
|
|
|
group_stages = [] |
|
|
|
|
|
|
|
|
|
|
|
if self.group_stages_running(): |
|
|
|
if self.group_stages_running(): |
|
|
|
group_stages = self.broadcasted_group_stages() |
|
|
|
group_stages = self.live_group_stages() |
|
|
|
matches = self.broadcasted_group_stages_matches() |
|
|
|
matches = self.broadcasted_group_stages_matches() |
|
|
|
else: |
|
|
|
else: |
|
|
|
# last_started_match = self.first_unfinished_match() |
|
|
|
# last_started_match = self.first_unfinished_match() |
|
|
|
@ -414,7 +414,7 @@ class Tournament(models.Model): |
|
|
|
matches.extend(previous_round.get_matches_recursive(True)) |
|
|
|
matches.extend(previous_round.get_matches_recursive(True)) |
|
|
|
else: |
|
|
|
else: |
|
|
|
matches.extend(current_round.all_matches(True)) |
|
|
|
matches.extend(current_round.all_matches(True)) |
|
|
|
group_stages = self.broadcasted_group_stages() |
|
|
|
group_stages = self.live_group_stages() |
|
|
|
|
|
|
|
|
|
|
|
return matches, group_stages |
|
|
|
return matches, group_stages |
|
|
|
|
|
|
|
|
|
|
|
|