Waiting list: Fix language of email context

This commit is contained in:
Raphael Michel
2023-04-24 14:01:19 +02:00
parent 76c6bd57e9
commit a86dfcd504

View File

@@ -219,18 +219,19 @@ class WaitingListEntry(LoggedModel):
self.voucher = v self.voucher = v
self.save() self.save()
self.send_mail( with language(self.locale, self.event.settings.region):
self.event.settings.mail_subject_waiting_list, self.send_mail(
self.event.settings.mail_text_waiting_list, self.event.settings.mail_subject_waiting_list,
get_email_context( self.event.settings.mail_text_waiting_list,
event=self.event, get_email_context(
waiting_list_entry=self, event=self.event,
waiting_list_voucher=v, waiting_list_entry=self,
event_or_subevent=self.subevent or self.event, waiting_list_voucher=v,
), event_or_subevent=self.subevent or self.event,
user=user, ),
auth=auth, user=user,
) auth=auth,
)
def send_mail(self, subject: Union[str, LazyI18nString], template: Union[str, LazyI18nString], def send_mail(self, subject: Union[str, LazyI18nString], template: Union[str, LazyI18nString],
context: Dict[str, Any]=None, log_entry_type: str='pretix.waitinglist.email.sent', context: Dict[str, Any]=None, log_entry_type: str='pretix.waitinglist.email.sent',