Ensuring that rotation only happens for certificates with endpoints to rotate. (#606)

This commit is contained in:
kevgliss 2016-12-15 15:20:21 -08:00 committed by GitHub
parent a09faac9a7
commit 156b98f7f0
1 changed files with 1 additions and 0 deletions

View File

@ -93,6 +93,7 @@ def get_all_pending_rotation():
end = now + timedelta(days=interval) end = now + timedelta(days=interval)
return Certificate.query.filter(Certificate.rotation == True)\ return Certificate.query.filter(Certificate.rotation == True)\
.filter(Certificate.endpoints.any())\
.filter(Certificate.not_after <= end.format('YYYY-MM-DD')).all() # noqa .filter(Certificate.not_after <= end.format('YYYY-MM-DD')).all() # noqa