From 94ba1e77dd2b1ae6187fa16e1ea34c3ff14f7e95 Mon Sep 17 00:00:00 2001 From: Jasmine Schladen Date: Mon, 7 Dec 2020 18:33:31 -0800 Subject: [PATCH] Improve formatting for multiword email notification types --- lemur/plugins/lemur_email/plugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lemur/plugins/lemur_email/plugin.py b/lemur/plugins/lemur_email/plugin.py index 214586ab..b3e706e8 100644 --- a/lemur/plugins/lemur_email/plugin.py +++ b/lemur/plugins/lemur_email/plugin.py @@ -108,7 +108,8 @@ class EmailNotificationPlugin(ExpirationNotificationPlugin): if not targets: return - subject = "Lemur: {0} Notification".format(notification_type.capitalize()) + readable_notification_type = ' '.join(map(lambda x: x.capitalize(), notification_type.split('_'))) + subject = f"Lemur: {readable_notification_type} Notification" body = render_html(notification_type, options, message)