From 9d6b15c3960ebc1648d3ccd84aef3fc5c7f9a039 Mon Sep 17 00:00:00 2001 From: stevekaplan123 Date: Mon, 9 Sep 2024 09:39:55 +0300 Subject: [PATCH] chore: field should be None for get_search_params when tab is sheet --- reader/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reader/views.py b/reader/views.py index 64c6d0b17b..9f56bd2765 100644 --- a/reader/views.py +++ b/reader/views.py @@ -788,10 +788,12 @@ def get_filters(prefix, filter_type): filters = [] agg_types = [] sort = None + field = None if get_dict.get('tab') == 'text': filters = get_filters("t", "path") sort = get_dict.get(get_param("tsort", i), None) agg_types = [None for _ in filters] # currently unused. just needs to be equal len as filters + field = ("naive_lemmatizer" if get_dict.get(get_param("tvar", i)) == "1" else "exact") if get_dict.get(get_param("tvar", i)) else "" else: for filter_type in sheet_filters_types: filters += get_filters("s", filter_type) @@ -801,7 +803,7 @@ def get_filters(prefix, filter_type): return { "query": urllib.parse.unquote(get_dict.get(get_param("q", i), "")), "tab": urllib.parse.unquote(get_dict.get(get_param("tab", i), "text")), - "field": ("naive_lemmatizer" if get_dict.get(get_param("tvar", i)) == "1" else "exact") if get_dict.get(get_param("tvar", i)) else "", + "field": field, "sort": sort, "filters": filters, "filterAggTypes": agg_types,