From 6e25edb54570a8c63ec195c52b11f421c4990dfa Mon Sep 17 00:00:00 2001 From: Razmig Sarkissian Date: Tue, 15 Jul 2025 10:32:31 +0200 Subject: [PATCH] Add null check for tournament in match formatting --- tournaments/models/match.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tournaments/models/match.py b/tournaments/models/match.py index f8e12fe..112b7af 100644 --- a/tournaments/models/match.py +++ b/tournaments/models/match.py @@ -479,7 +479,8 @@ class Match(TournamentSubModel): ended = self.end_date is not None live_format = "Format " - if self.get_tournament().day_duration >= 7: + tournament = self.get_tournament() + if tournament and tournament.day_duration >= 7: live_format = "" live_format = live_format + FederalMatchCategory(self.format).format_label_short