addressing Chad's feedbakc

This commit is contained in:
Hossein Shafagh 2020-10-26 19:16:40 -07:00
parent 2430507e55
commit 3b258447db
1 changed files with 1 additions and 1 deletions

View File

@ -583,7 +583,7 @@ def query_common_name(common_name, args):
# search based on owner and cn # search based on owner and cn
result = ( result = (
Certificate.query.filter(Certificate.not_after >= current_time.format("YYYY-MM-DD")) Certificate.query.filter(Certificate.not_after >= current_time.format("YYYY-MM-DD"))
.filter(Certificate.cn.like(common_name)) .filter(Certificate.cn.ilike(common_name))
.filter(Certificate.owner == owner) .filter(Certificate.owner == owner)
.filter(not_(Certificate.revoked)) .filter(not_(Certificate.revoked))
.filter(not_(Certificate.replaced.any())) # ignore rotated certificates to avoid duplicates .filter(not_(Certificate.replaced.any())) # ignore rotated certificates to avoid duplicates