Making LEMUR_DEFAULT_SECURITY_EMAIL optional

This commit is contained in:
kevgliss 2015-08-17 16:03:57 -07:00
parent 500b212a25
commit eb55d5465f
2 changed files with 5 additions and 1 deletions

View File

@ -220,7 +220,8 @@ def create(**kwargs):
notifications += notification_service.create_default_expiration_notifications(notification_name, [cert.owner]) notifications += notification_service.create_default_expiration_notifications(notification_name, [cert.owner])
notification_name = 'DEFAULT_SECURITY' 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 cert.notifications = notifications
database.update(cert) database.update(cert)

View File

@ -178,6 +178,9 @@ def create_default_expiration_notifications(name, recipients):
:param name: :param name:
:return: :return:
""" """
if not recipients:
return []
options = [ options = [
{ {
'name': 'unit', 'name': 'unit',