Ensuring that our syncing process can find duplicate certifcates that do no need to be sync'd (#560)

This commit is contained in:
kevgliss 2016-12-05 11:08:29 -08:00 committed by GitHub
parent eee534a161
commit 9030aed8a4
1 changed files with 3 additions and 3 deletions

View File

@ -86,10 +86,10 @@ def find_duplicates(cert):
:param cert:
:return:
"""
if cert.get('chain'):
return Certificate.query.filter_by(body=cert['body'].strip(), chain=cert['chain'].strip()).all()
if cert.chain:
return Certificate.query.filter_by(body=cert.body.strip(), chain=cert.chain.strip()).all()
else:
return Certificate.query.filter_by(body=cert['body'].strip(), chain=None).all()
return Certificate.query.filter_by(body=cert.body.strip(), chain=None).all()
def export(cert, export_plugin):