From f01a681e93c7bb8b2c94ee651534869073380334 Mon Sep 17 00:00:00 2001 From: Razmig Sarkissian Date: Mon, 27 Oct 2025 15:49:07 +0100 Subject: [PATCH] Add null check for event and event creator in umpire_phone --- 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 65c1b5f..b85df35 100644 --- a/tournaments/models/tournament.py +++ b/tournaments/models/tournament.py @@ -1770,7 +1770,9 @@ class Tournament(BaseModel): def umpire_phone(self): if self.umpire_custom_phone is not None: return self.umpire_custom_phone - return self.event.creator.phone + if self.event and self.event.creator: + return self.event.creator.phone + return None def calculate_time_to_confirm(self, waiting_list_count): """