Skip to content

Commit

Permalink
ignore case when comparing 'Value' from searchengine
Browse files Browse the repository at this point in the history
  • Loading branch information
will-moore committed Oct 22, 2024
1 parent 7c39971 commit bc52d14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion idr_gallery/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def search_engine_keys(request, value, exact_match=False):
url += f"?value={value}"
json_data = requests.get(url).json().get("data", [])
if exact_match:
json_data = filter(lambda x: x.get("Value") == value, json_data)
json_data = list(filter(lambda x: x.get("Value").lower() == value.lower(), json_data))
keys = [result.get("Key") for result in json_data]
return keys

Expand Down

0 comments on commit bc52d14

Please sign in to comment.