Fix incorrect preview/history of subject rendering

This commit is contained in:
Raphael Michel
2020-07-13 15:56:55 +02:00
parent e10e3300ba
commit 33682e1b38
2 changed files with 7 additions and 3 deletions

View File

@@ -795,7 +795,7 @@ class Order(LockModel, LoggedModel):
only be attached for this position and child positions, the link will only point to the
position and the attendee email will be used if available.
"""
from pretix.base.services.mail import SendMailException, mail, render_mail
from pretix.base.services.mail import SendMailException, mail, render_mail, TolerantDict
if not self.email:
return
@@ -810,6 +810,7 @@ class Order(LockModel, LoggedModel):
try:
email_content = render_mail(template, context)
subject = subject.format_map(TolerantDict(context))
mail(
recipient, subject, template, context,
self.event, self.locale, self, headers=headers, sender=sender,