Fix case insensitive license search in querybuilder.py

This commit is contained in:
rubenwardy 2024-06-05 19:31:48 +01:00
parent 6a53f25665
commit 804e131cb8

@ -104,7 +104,7 @@ class QueryBuilder:
self.flags = set(args.getlist("flag"))
# License
self.licenses = [License.query.filter(func.lower(License.name) == name).first() for name in args.getlist("license")]
self.licenses = [License.query.filter(func.lower(License.name) == name.lower()).first() for name in args.getlist("license")]
if emit_http_errors and any(map(lambda x: x is None, self.licenses)):
abort(make_response("Unknown license"), 400)