used fixedName variable to transport db lookup optimization

This commit is contained in:
Jay Zarfoss
2019-11-20 09:44:31 -08:00
parent 93aca891b7
commit 00a0a27826
3 changed files with 5 additions and 2 deletions

View File

@ -393,6 +393,9 @@ def render(args):
Certificate.cn.ilike(term),
)
)
elif "fixedName" in terms:
# only what matches the fixed name directly if a fixedname is provided
query = query.filter(Certificate.name == terms[1])
else:
query = database.filter(query, Certificate, terms)