Return default fallback if media_type is not available

parent 9db2bfd8
......@@ -153,6 +153,9 @@ class Notification:
output['message'] = self.render_template(media_type, lang)
return output
except NotificationTemplatingError:
if media_type not in self.fallback:
output['message'] = self.fallback['plain']
else:
output['message'] = self.fallback[media_type]
return output
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment