Add null check to umpire_mail method

main^2
Razmig Sarkissian 2 weeks ago
parent f01a681e93
commit 85c56981a6
  1. 4
      tournaments/models/tournament.py

@ -1765,7 +1765,9 @@ class Tournament(BaseModel):
def umpire_mail(self): def umpire_mail(self):
if self.umpire_custom_mail is not None: if self.umpire_custom_mail is not None:
return self.umpire_custom_mail 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): def umpire_phone(self):
if self.umpire_custom_phone is not None: if self.umpire_custom_phone is not None:

Loading…
Cancel
Save