diff --git a/tournaments/models/tournament.py b/tournaments/models/tournament.py index 55c07ad..030289a 100644 --- a/tournaments/models/tournament.py +++ b/tournaments/models/tournament.py @@ -278,7 +278,8 @@ class Tournament(models.Model): match_groups.append(self.group_stage_match_group(group_stage, broadcasted, hide_empty_matches=False)) elif round_id: round = self.round_set.filter(id=round_id).first() - match_groups = self.round_match_groups(round, broadcasted, hide_empty_matches=False) + if round: + match_groups = self.round_match_groups(round, broadcasted, hide_empty_matches=False) else: match_groups = self.all_groups(broadcasted)