|
|
|
|
@ -337,8 +337,6 @@ class Tournament(models.Model): |
|
|
|
|
|
|
|
|
|
def create_match_group(self, name, matches, broadcasted): |
|
|
|
|
matches = list(matches) |
|
|
|
|
# if not broadcasted: |
|
|
|
|
# matches = [m for m in matches if m.should_appear()] |
|
|
|
|
matches.sort(key=lambda m: m.index) |
|
|
|
|
live_matches = [match.live_match() for match in matches] |
|
|
|
|
return MatchGroup(name, live_matches) |
|
|
|
|
@ -459,8 +457,7 @@ class Tournament(models.Model): |
|
|
|
|
for group_stage in self.groupstage_set.all(): |
|
|
|
|
matches.extend(group_stage.match_set.all()) |
|
|
|
|
matches = [m for m in matches if m.should_appear()] |
|
|
|
|
# matches = [m for m in matches if m.start_date] |
|
|
|
|
matches.sort(key=lambda m: m.start_date, reverse=True) |
|
|
|
|
matches.sort(key=lambda m: (m.non_null_start_date(), m.index), reverse=True) |
|
|
|
|
return matches |
|
|
|
|
|
|
|
|
|
def display_rankings(self): |
|
|
|
|
|