sync_v2
Laurent 8 months ago
parent 49123a3b58
commit 810c6578bc
  1. 7
      tournaments/models/tournament.py
  2. 3
      tournaments/services/email_service.py

@ -1416,11 +1416,14 @@ class Tournament(BaseModel):
else:
return True
def umpire_contact(self):
def umpire_contact(self):
if self.umpire_custom_contact is not None:
print(self.umpire_custom_contact)
return self.umpire_custom_contact
return self.event.creator.full_name()
if self.event and self.event.creator:
return self.event.creator.full_name()
else:
return None
def umpire_mail(self):
if self.umpire_custom_mail is not None:

@ -334,7 +334,8 @@ class TournamentEmailService:
def _format_umpire_contact(tournament):
contact_parts = []
creator_full_name = tournament.umpire_contact()
contact_parts.append(creator_full_name)
if creator_full_name:
contact_parts.append(creator_full_name)
if not tournament.hide_umpire_mail:
creator_email = tournament.umpire_mail()

Loading…
Cancel
Save