Merge pull request #235 from kevgliss/226_replaces

Makes 'replacements' a non-required attribute for importing. Closes #226
This commit is contained in:
kevgliss 2016-01-29 09:42:42 -08:00
commit f3a28814ae
1 changed files with 4 additions and 1 deletions

View File

@ -189,7 +189,10 @@ def import_certificate(**kwargs):
notification_name = 'DEFAULT_SECURITY'
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'])
cert.notifications = notifications
cert = database.create(cert)