Fix logging error for automated emails

This commit is contained in:
Raphael Michel
2021-10-07 10:07:58 +02:00
parent 65167cc290
commit f459f1f12d
2 changed files with 3 additions and 2 deletions

View File

@@ -2212,7 +2212,7 @@ class OrderPosition(AbstractPosition):
:param attach_ical: Attach relevant ICS files
"""
from pretix.base.services.mail import (
SendMailException, mail, render_mail,
SendMailException, TolerantDict, mail, render_mail,
)
if not self.attendee_email:
@@ -2225,6 +2225,7 @@ class OrderPosition(AbstractPosition):
recipient = self.attendee_email
try:
email_content = render_mail(template, context)
subject = str(subject).format_map(TolerantDict(context))
mail(
recipient, subject, template, context,
self.event, self.order.locale, order=self.order, headers=headers, sender=sender,