|
|
|
|
@ -277,7 +277,6 @@ class Tournament(models.Model): |
|
|
|
|
|
|
|
|
|
def group_stage_match_group(self, group_stage, broadcasted, hide_empty_matches): |
|
|
|
|
matches = group_stage.match_set.all() |
|
|
|
|
if hide_empty_matches: |
|
|
|
|
matches = [m for m in matches if m.should_appear()] |
|
|
|
|
|
|
|
|
|
if matches: |
|
|
|
|
@ -289,14 +288,17 @@ class Tournament(models.Model): |
|
|
|
|
groups = [] |
|
|
|
|
|
|
|
|
|
matches = round.match_set.order_by('index').all() |
|
|
|
|
if hide_empty_matches: |
|
|
|
|
matches = [m for m in matches if m.should_appear()] |
|
|
|
|
|
|
|
|
|
if matches: |
|
|
|
|
group = self.create_match_group(round.name(), round.match_set.all(), broadcasted) |
|
|
|
|
round_matches = round.match_set.all() |
|
|
|
|
round_matches = [m for m in round_matches if m.should_appear()] |
|
|
|
|
|
|
|
|
|
group = self.create_match_group(round.name(), round_matches, broadcasted) |
|
|
|
|
groups.append(group) |
|
|
|
|
|
|
|
|
|
ranking_matches = round.ranking_matches(hide_empty_matches) |
|
|
|
|
ranking_matches = [m for m in ranking_matches if m.should_appear()] |
|
|
|
|
if len(ranking_matches) > 0: |
|
|
|
|
group = self.create_match_group('Matchs de classement', ranking_matches, broadcasted) |
|
|
|
|
groups.append(group) |
|
|
|
|
@ -375,7 +377,6 @@ class Tournament(models.Model): |
|
|
|
|
for group_stage in self.groupstage_set.all(): |
|
|
|
|
matches.extend(group_stage.match_set.all()) |
|
|
|
|
|
|
|
|
|
if hide_empty_matches: |
|
|
|
|
matches = [m for m in matches if m.should_appear()] |
|
|
|
|
|
|
|
|
|
return matches |
|
|
|
|
|