making 'replacements' a non-require attribute for importing. Closes #226

This commit is contained in:
kevgliss 2016-01-29 09:02:51 -08:00
parent 467c276fca
commit 1e524a49c0
1 changed files with 4 additions and 1 deletions

View File

@ -189,7 +189,10 @@ def import_certificate(**kwargs):
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'))
if kwargs.get('replacements'):
database.update_list(cert, 'replaces', Certificate, kwargs['replacements']) database.update_list(cert, 'replaces', Certificate, kwargs['replacements'])
cert.notifications = notifications cert.notifications = notifications
cert = database.create(cert) cert = database.create(cert)