Merge pull request #2811 from hosseinsh/generalizing-api

removing the rotation enabled requirement, to keep the endpoint generic
This commit is contained in:
Hossein Shafagh 2019-06-20 16:38:28 -07:00 committed by GitHub
commit 7bff3a7947
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -445,7 +445,7 @@ def query_name(certificate_name, args):
def query_common_name(common_name, args): def query_common_name(common_name, args):
""" """
Helper function that queries for not expired certificates by common name and owner which have auto-rotate enabled Helper function that queries for not expired certificates by common name (and owner)
:param common_name: :param common_name:
:param args: :param args:
@ -462,7 +462,6 @@ def query_common_name(common_name, args):
Certificate.query.filter(Certificate.cn.ilike(common_name)) Certificate.query.filter(Certificate.cn.ilike(common_name))
.filter(Certificate.owner.ilike(owner)) .filter(Certificate.owner.ilike(owner))
.filter(Certificate.not_after >= current_time.format("YYYY-MM-DD")) .filter(Certificate.not_after >= current_time.format("YYYY-MM-DD"))
.filter(Certificate.rotation.is_(True))
.all() .all()
) )