From 1e524a49c092d1ccdcffe22d58e2b5c48723e1cb Mon Sep 17 00:00:00 2001 From: kevgliss Date: Fri, 29 Jan 2016 09:02:51 -0800 Subject: [PATCH] making 'replacements' a non-require attribute for importing. Closes #226 --- lemur/certificates/service.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lemur/certificates/service.py b/lemur/certificates/service.py index ce372972..45f0f266 100644 --- a/lemur/certificates/service.py +++ b/lemur/certificates/service.py @@ -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')) - database.update_list(cert, 'replaces', Certificate, kwargs['replacements']) + + if kwargs.get('replacements'): + database.update_list(cert, 'replaces', Certificate, kwargs['replacements']) + cert.notifications = notifications cert = database.create(cert)