From 85c56981a6c164f01f1a537baabe33e103a7e2a0 Mon Sep 17 00:00:00 2001 From: Razmig Sarkissian Date: Mon, 27 Oct 2025 15:50:41 +0100 Subject: [PATCH] Add null check to umpire_mail method --- tournaments/models/tournament.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tournaments/models/tournament.py b/tournaments/models/tournament.py index b85df35..910d4b2 100644 --- a/tournaments/models/tournament.py +++ b/tournaments/models/tournament.py @@ -1765,7 +1765,9 @@ class Tournament(BaseModel): def umpire_mail(self): if self.umpire_custom_mail is not None: return self.umpire_custom_mail - return self.event.creator.email + if self.event and self.event.creator: + return self.event.creator.email + return None def umpire_phone(self): if self.umpire_custom_phone is not None: