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',