From fa0b1bd2a2d43a033046d16f9ebd5809bc8e6370 Mon Sep 17 00:00:00 2001 From: Laurent Date: Sat, 21 Dec 2024 10:15:25 +0100 Subject: [PATCH] Fix issue where group_stage is None --- tournaments/models/tournament.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tournaments/models/tournament.py b/tournaments/models/tournament.py index 06ff2d4..7c3e9d6 100644 --- a/tournaments/models/tournament.py +++ b/tournaments/models/tournament.py @@ -437,6 +437,8 @@ class Tournament(models.Model): return groups def group_stage_match_group(self, group_stage, broadcasted, hide_empty_matches): + if group_stage is None: + return None matches = group_stage.match_set.all() if hide_empty_matches: matches = [m for m in matches if m.should_appear()]