Make sure correct language is active when generating email attachments

This commit is contained in:
Raphael Michel
2020-07-16 12:12:16 +02:00
parent 591d70eabe
commit 980f4012bc

View File

@@ -283,6 +283,7 @@ def mail_send_task(self, *args, to: List[str], subject: str, body: str, html: st
except Order.DoesNotExist:
order = None
else:
with language(order.locale):
if position:
try:
position = order.positions.get(pk=position)