From 7ef788752ebb1ec55cdfb35b7e9e7c91094dcacd Mon Sep 17 00:00:00 2001 From: kevgliss Date: Fri, 6 Oct 2017 17:39:31 -0700 Subject: [PATCH] Source plugin (#964) * Another minor fix. --- lemur/sources/service.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lemur/sources/service.py b/lemur/sources/service.py index 9d140049..29043f2c 100644 --- a/lemur/sources/service.py +++ b/lemur/sources/service.py @@ -106,6 +106,7 @@ def sync_endpoints(source): return new, updated +# TODO this is very slow as we don't batch update certificates def sync_certificates(source, user): new, updated = 0, 0 @@ -136,12 +137,10 @@ def sync_certificates(source, user): else: for e in exists: if certificate.get('external_id'): - exists.external_id = certificate['external_id'] + e.external_id = certificate['external_id'] certificate_update(e, source) updated += 1 - assert len(certificates) == new + updated - return new, updated