Prevent broken email placeholders from stopping emails (#2525)

This commit is contained in:
Raphael Michel
2022-03-10 14:06:57 +01:00
committed by GitHub
parent 86d28b3f21
commit cc04f66a48

View File

@@ -310,7 +310,11 @@ def get_email_context(**kwargs):
val = [val]
for v in val:
if all(rp in kwargs for rp in v.required_context):
ctx[v.identifier] = v.render(kwargs)
try:
ctx[v.identifier] = v.render(kwargs)
except:
ctx[v.identifier] = '(error)'
logger.exception(f'Failed to process email placeholder {v.identifier}.')
return ctx