mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 14:32:25 +01:00
Make search case-insensitive by using ilike
This commit is contained in:
parent
d6790903a6
commit
179d0be933
@ -51,7 +51,7 @@ def packages_page():
|
|||||||
|
|
||||||
search = request.args.get("q")
|
search = request.args.get("q")
|
||||||
if search is not None:
|
if search is not None:
|
||||||
query = query.filter(Package.title.contains(search))
|
query = query.filter(Package.title.ilike('%' + search + '%'))
|
||||||
|
|
||||||
if shouldReturnJson():
|
if shouldReturnJson():
|
||||||
pkgs = [package.getAsDictionary(app.config["BASE_URL"]) \
|
pkgs = [package.getAsDictionary(app.config["BASE_URL"]) \
|
||||||
|
Loading…
Reference in New Issue
Block a user