From eb55d5465f7e47f7cb0ec3450372117bd58c3ea9 Mon Sep 17 00:00:00 2001 From: kevgliss Date: Mon, 17 Aug 2015 16:03:57 -0700 Subject: [PATCH] Making LEMUR_DEFAULT_SECURITY_EMAIL optional --- lemur/certificates/service.py | 3 ++- lemur/notifications/service.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lemur/certificates/service.py b/lemur/certificates/service.py index a49e69b8..8dbc7597 100644 --- a/lemur/certificates/service.py +++ b/lemur/certificates/service.py @@ -220,7 +220,8 @@ def create(**kwargs): notifications += notification_service.create_default_expiration_notifications(notification_name, [cert.owner]) notification_name = 'DEFAULT_SECURITY' - notifications += notification_service.create_default_expiration_notifications(notification_name, current_app.config.get('LEMUR_SECURITY_TEAM_EMAIL')) + notifications += notification_service.create_default_expiration_notifications(notification_name, + current_app.config.get('LEMUR_SECURITY_TEAM_EMAIL')) cert.notifications = notifications database.update(cert) diff --git a/lemur/notifications/service.py b/lemur/notifications/service.py index 648c0dc4..4f3ba6c1 100644 --- a/lemur/notifications/service.py +++ b/lemur/notifications/service.py @@ -178,6 +178,9 @@ def create_default_expiration_notifications(name, recipients): :param name: :return: """ + if not recipients: + return [] + options = [ { 'name': 'unit',