Return default fallback if media_type is not available

parent 9db2bfd8
......@@ -153,7 +153,10 @@ class Notification:
output['message'] = self.render_template(media_type, lang)
return output
except NotificationTemplatingError:
output['message'] = self.fallback[media_type]
if media_type not in self.fallback:
output['message'] = self.fallback['plain']
output['message'] = self.fallback[media_type]
return output
def render_fallback_data(self):
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