Allow to use event meta data in email templates

This commit is contained in:
Raphael Michel
2019-02-20 14:33:45 +01:00
parent 21634369a8
commit d35ad345d7
4 changed files with 28 additions and 3 deletions

View File

@@ -79,6 +79,10 @@ def mail(email: str, subject: str, template: Union[str, LazyI18nString],
headers = headers or {}
with language(locale):
if isinstance(context, dict) and event:
for k, v in event.meta_data.items():
context['meta_' + k] = v
if isinstance(context, dict) and order:
try:
context.update({