Skip to content

Commit

Permalink
Fix email preview when event has no persons
Browse files Browse the repository at this point in the history
  • Loading branch information
ThiefMaster committed Jan 31, 2023
1 parent 922d3c2 commit b5fcb22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion indico/modules/events/persons/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ class RHEmailEventPersonsPreview(RHManageEventBase):
'no_account': fields.Bool(load_default=False),
})
def _process(self, body, subject, no_account):
person = self.event.persons[0]
person = self.event.persons.first() or session.user
email_body = replace_placeholders('event-persons-email', body, event=self.event, person=person,
register_link=no_account)
email_subject = replace_placeholders('event-persons-email', subject, event=self.event, person=person,
Expand Down

0 comments on commit b5fcb22

Please sign in to comment.