Skip to content

Commit

Permalink
chore: field should be None for get_search_params when tab is sheet
Browse files Browse the repository at this point in the history
  • Loading branch information
stevekaplan123 committed Sep 9, 2024
1 parent e9096a2 commit 9d6b15c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion reader/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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,
Expand Down

0 comments on commit 9d6b15c

Please sign in to comment.