From 804e131cb85baf2d90914e6baeac0b81d455c4c5 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Wed, 5 Jun 2024 19:31:48 +0100 Subject: [PATCH] Fix case insensitive license search in querybuilder.py --- app/querybuilder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/querybuilder.py b/app/querybuilder.py index edda22b0..8b63f071 100644 --- a/app/querybuilder.py +++ b/app/querybuilder.py @@ -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)