From 8e04928441b4db6346b1490e2cfc13d8c8780a73 Mon Sep 17 00:00:00 2001 From: Laurent Date: Wed, 17 Jul 2024 11:36:16 +0200 Subject: [PATCH] Fix crash --- tournaments/models/match.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tournaments/models/match.py b/tournaments/models/match.py index f9c0f02..8a9e780 100644 --- a/tournaments/models/match.py +++ b/tournaments/models/match.py @@ -185,7 +185,9 @@ class Match(models.Model): date = self.formatted_start_date() duration = self.time_indication() court = self.court_name(self.court_index) - group_stage_name = self.group_stage.display_name() + group_stage_name = None + if self.group_stage: + group_stage_name = self.group_stage.display_name() ended = self.end_date is not None livematch = LiveMatch(title, date, duration, court, self.started(), ended, group_stage_name)