From f7a59f46724075a19507cc941c5e792451c94706 Mon Sep 17 00:00:00 2001 From: TLSM Date: Tue, 21 Jun 2022 01:31:31 -0400 Subject: [PATCH] Make search operators case insensitive. In light of the fact that all searching against the database is done using ILIKE pattern matching, the only truly case-sensitive part of the search query was search operator keys. Rather than lowercase the keys in `criteria` before returning, we instead lowercase the entire search string at the beginning of parsing. This will further enforce case-insensitivity on the design of search going forward. --- files/routes/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/search.py b/files/routes/search.py index 097f6a435..2591ce4db 100644 --- a/files/routes/search.py +++ b/files/routes/search.py @@ -12,7 +12,7 @@ valid_params=[ ] def searchparse(text): - + text = text.lower() criteria = {x[0]:x[1] for x in query_regex.findall(text)}