From df2b48f40ebfbccdce26fc6e2b4a159576beec76 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 30 Dec 2024 17:47:38 -0500 Subject: [PATCH] search operators are case insensitive --- catalog/sites/igdb.py | 2 +- journal/models/index.py | 2 +- journal/templates/search_journal.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/catalog/sites/igdb.py b/catalog/sites/igdb.py index 7f09f1ce..a14f392c 100644 --- a/catalog/sites/igdb.py +++ b/catalog/sites/igdb.py @@ -72,7 +72,7 @@ class IGDB(AbstractSite): try: r = json.loads(_wrapper.api_request(p, q)) # type: ignore except requests.HTTPError as e: - logger.error("IGDB API: {e}", extra={"exception": e}) + logger.error(f"IGDB API: {e}", extra={"exception": e}) return [] if settings.DOWNLOADER_SAVEDIR: with open( diff --git a/journal/models/index.py b/journal/models/index.py index 4f2ede26..75f5fae9 100644 --- a/journal/models/index.py +++ b/journal/models/index.py @@ -310,7 +310,7 @@ class QueryParser: @classmethod def re(cls): return re.compile( - r"\b(?P" + "|".join(cls.fields) + r"):(?P[^ ]+)" + r"\b(?P" + "|".join(cls.fields) + r"):(?P[^ ]+)", re.I ) def __init__(self, query: str): diff --git a/journal/templates/search_journal.html b/journal/templates/search_journal.html index e9adabf4..283efeb9 100644 --- a/journal/templates/search_journal.html +++ b/journal/templates/search_journal.html @@ -22,7 +22,7 @@ {% for item in items %} {% include '_list_item.html' %} {% empty %} -

{% trans "No items matching the search query." %}

+

{% trans "No items matching your search query." %}

{% endfor %}