Source plugin (#964)

* Another minor fix.
This commit is contained in:
kevgliss 2017-10-06 17:39:31 -07:00 committed by GitHub
parent b66d7ce1fd
commit 7ef788752e

View File

@ -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