From c4023c1dc8f677e2420c7f0183b7064ac22787bc Mon Sep 17 00:00:00 2001 From: Galen Date: Sun, 27 Oct 2024 15:22:44 -0700 Subject: [PATCH 1/9] use search_request query obj in lieu of request.GET for all methods calls in standard search view, re #11578 --- .../search/components/standard_search_view.py | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/arches/app/search/components/standard_search_view.py b/arches/app/search/components/standard_search_view.py index 6af783b1af6..b7c40c2af0e 100644 --- a/arches/app/search/components/standard_search_view.py +++ b/arches/app/search/components/standard_search_view.py @@ -122,6 +122,7 @@ class StandardSearchView(BaseSearchView): def append_dsl(self, search_query_object, **kwargs): + search_request_object = kwargs.get("search_request_object", self.request.GET) search_query_object["query"].include("graph_id") search_query_object["query"].include("root_ontology_class") search_query_object["query"].include("resourceinstanceid") @@ -132,15 +133,16 @@ def append_dsl(self, search_query_object, **kwargs): search_query_object["query"].include("map_popup") search_query_object["query"].include("provisional_resource") search_query_object["query"].include("permissions") - load_tiles = get_str_kwarg_as_bool("tiles", self.request.GET) + load_tiles = get_str_kwarg_as_bool("tiles", search_request_object) if load_tiles: search_query_object["query"].include("tiles") def execute_query(self, search_query_object, response_object, **kwargs): - for_export = get_str_kwarg_as_bool("export", self.request.GET) - pages = self.request.GET.get("pages", None) - total = int(self.request.GET.get("total", "0")) - resourceinstanceid = self.request.GET.get("id", None) + search_request_object = kwargs.get("search_request_object", self.request.GET) + for_export = get_str_kwarg_as_bool("export", search_request_object) + pages = search_request_object.get("pages", None) + total = int(search_request_object.get("total", "0")) + resourceinstanceid = search_request_object.get("id", None) dsl = search_query_object["query"] if for_export or pages: results = dsl.search(index=RESOURCES_INDEX, scroll="1m") @@ -220,6 +222,7 @@ def handle_search_results_query( permitted_nodegroups=permitted_nodegroups, include_provisional=include_provisional, querystring=querystring, + search_request_object=sorted_query_obj, ) append_instance_permission_filter_dsl(self.request, search_query_object) except Exception as err: @@ -235,7 +238,11 @@ def handle_search_results_query( for filter_type, querystring in list(sorted_query_obj.items()): search_filter = search_filter_factory.get_filter(filter_type) if search_filter: - search_filter.execute_query(search_query_object, response_object) + search_filter.execute_query( + search_query_object, + response_object, + search_request_object=sorted_query_obj, + ) if response_object["results"] is not None: # allow filters to modify the results @@ -246,6 +253,7 @@ def handle_search_results_query( search_query_object, response_object, permitted_nodegroups=permitted_nodegroups, + search_request_object=sorted_query_obj, ) search_query_object.pop("query") From 0315aacc1477cdab7cb3d0f92870e17277e4d8e7 Mon Sep 17 00:00:00 2001 From: Galen Date: Sun, 27 Oct 2024 16:24:18 -0700 Subject: [PATCH 2/9] use kwargs.search_request_object instead of request.GET in search_filters, re #11578 --- arches/app/search/components/paging_filter.py | 18 ++++++++++-------- arches/app/search/components/sort_results.py | 2 +- arches/app/search/components/term_filter.py | 3 ++- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/arches/app/search/components/paging_filter.py b/arches/app/search/components/paging_filter.py index 216208be123..be258d4bac7 100644 --- a/arches/app/search/components/paging_filter.py +++ b/arches/app/search/components/paging_filter.py @@ -17,25 +17,27 @@ class PagingFilter(BaseSearchFilter): def append_dsl(self, search_query_object, **kwargs): - export = self.request.GET.get("export", None) - mobile_download = self.request.GET.get("mobiledownload", None) + search_request_object = kwargs.get("search_request_object", self.request.GET) + export = search_request_object.get("export", None) + mobile_download = search_request_object.get("mobiledownload", None) page = ( 1 - if self.request.GET.get(self.componentname) == "" - else int(self.request.GET.get(self.componentname, 1)) + if search_request_object.get(self.componentname) == "" + else int(search_request_object.get(self.componentname, 1)) ) if export is not None: limit = settings.SEARCH_RESULT_LIMIT elif mobile_download is not None: - limit = self.request.GET["resourcecount"] + limit = search_request_object.get("resourcecount") else: limit = settings.SEARCH_ITEMS_PER_PAGE - limit = int(self.request.GET.get("limit", limit)) + limit = int(search_request_object.get("limit", limit)) search_query_object["query"].start = limit * int(page - 1) search_query_object["query"].limit = limit def post_search_hook(self, search_query_object, response_object, **kwargs): + search_request_object = kwargs.get("search_request_object", self.request.GET) total = ( response_object["results"]["hits"]["total"]["value"] if response_object["results"]["hits"]["total"]["value"] @@ -44,8 +46,8 @@ def post_search_hook(self, search_query_object, response_object, **kwargs): ) page = ( 1 - if self.request.GET.get(self.componentname) == "" - else int(self.request.GET.get(self.componentname, 1)) + if search_request_object.get(self.componentname) == "" + else int(search_request_object.get(self.componentname, 1)) ) paginator, pages = get_paginator( diff --git a/arches/app/search/components/sort_results.py b/arches/app/search/components/sort_results.py index 4682998560f..7174b4648be 100644 --- a/arches/app/search/components/sort_results.py +++ b/arches/app/search/components/sort_results.py @@ -16,7 +16,7 @@ class SortResults(BaseSearchFilter): def append_dsl(self, search_query_object, **kwargs): - sort_param = self.request.GET.get(self.componentname, None) + sort_param = kwargs.get("querystring", None) if sort_param is not None and sort_param != "": search_query_object["query"].sort( diff --git a/arches/app/search/components/term_filter.py b/arches/app/search/components/term_filter.py index f100753766c..23d8223ff5c 100644 --- a/arches/app/search/components/term_filter.py +++ b/arches/app/search/components/term_filter.py @@ -34,7 +34,8 @@ def append_dsl(self, search_query_object, **kwargs): include_provisional = kwargs.get("include_provisional") search_query = Bool() querystring_params = kwargs.get("querystring", "[]") - language = self.request.GET.get("language", "*") + search_request_object = kwargs.get("search_request_object", self.request.GET) + language = search_request_object.get("language", "*") for term in JSONDeserializer().deserialize(querystring_params): if term["type"] == "term" or term["type"] == "string": string_filter = Bool() From 6599a43a2fc6a309c0407291e3b3e193323f592d Mon Sep 17 00:00:00 2001 From: Galen Date: Sun, 27 Oct 2024 17:07:23 -0700 Subject: [PATCH 3/9] handle case in tests of empty dict value for paging-filter search param, re #11578 --- arches/app/search/components/paging_filter.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arches/app/search/components/paging_filter.py b/arches/app/search/components/paging_filter.py index be258d4bac7..fa48f744c67 100644 --- a/arches/app/search/components/paging_filter.py +++ b/arches/app/search/components/paging_filter.py @@ -23,6 +23,7 @@ def append_dsl(self, search_query_object, **kwargs): page = ( 1 if search_request_object.get(self.componentname) == "" + or isinstance(search_request_object.get(self.componentname), dict) else int(search_request_object.get(self.componentname, 1)) ) @@ -47,6 +48,7 @@ def post_search_hook(self, search_query_object, response_object, **kwargs): page = ( 1 if search_request_object.get(self.componentname) == "" + or isinstance(search_request_object.get(self.componentname), dict) else int(search_request_object.get(self.componentname, 1)) ) From fa81b4fd4476feab3da8d0d6c127bae19e43dc90 Mon Sep 17 00:00:00 2001 From: Galen Date: Thu, 14 Nov 2024 15:34:04 -0800 Subject: [PATCH 4/9] set dynamic requestMethod for search query method on frontend, re #11578 --- .../media/js/views/components/search/base-search-view.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arches/app/media/js/views/components/search/base-search-view.js b/arches/app/media/js/views/components/search/base-search-view.js index 4c170fd6c4f..f20e626b2e9 100644 --- a/arches/app/media/js/views/components/search/base-search-view.js +++ b/arches/app/media/js/views/components/search/base-search-view.js @@ -50,8 +50,9 @@ define([ doQuery: function() { const queryObj = JSON.parse(this.queryString()); if (self.updateRequest) { self.updateRequest.abort(); } + const requestMethod = JSON.stringify(queryObj).length > 1800 ? "POST" : "GET"; self.updateRequest = $.ajax({ - type: "GET", + type: requestMethod, url: arches.urls.search_results, data: queryObj, context: this, @@ -82,7 +83,8 @@ define([ }, complete: function(request, status) { self.updateRequest = undefined; - window.history.pushState({}, '', '?' + $.param(queryObj).split('+').join('%20')); + if (requestMethod === "GET") + window.history.pushState({}, '', '?' + $.param(queryObj).split('+').join('%20')); this.sharedStateObject.loading(false); } }); From a1f34c45bf5212fb27c675af98493643f21f705e Mon Sep 17 00:00:00 2001 From: Galen Date: Tue, 19 Nov 2024 22:04:50 -0800 Subject: [PATCH 5/9] search_request_object --> SearchView.search_request; set self.search_request in BaseSearchFilter, re #11578 --- .../app/search/components/base_search_view.py | 5 ++++ arches/app/search/components/paging_filter.py | 24 ++++++++--------- .../search/components/standard_search_view.py | 27 ++++++++----------- arches/app/search/components/term_filter.py | 4 +-- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/arches/app/search/components/base_search_view.py b/arches/app/search/components/base_search_view.py index b6064a83cea..6a7dcc04118 100644 --- a/arches/app/search/components/base_search_view.py +++ b/arches/app/search/components/base_search_view.py @@ -95,6 +95,11 @@ def __init__(self, request=None, user=None, componentname=None): item.componentname, float("inf") ), ) + request_object = ( + self.request.GET if self.request.method == "GET" else self.request.POST + ) + request_object = request_object.dict() + self.search_request = self.create_query_dict(request_object) @property def required_search_filters(self): diff --git a/arches/app/search/components/paging_filter.py b/arches/app/search/components/paging_filter.py index fa48f744c67..1ef6217572e 100644 --- a/arches/app/search/components/paging_filter.py +++ b/arches/app/search/components/paging_filter.py @@ -17,28 +17,28 @@ class PagingFilter(BaseSearchFilter): def append_dsl(self, search_query_object, **kwargs): - search_request_object = kwargs.get("search_request_object", self.request.GET) - export = search_request_object.get("export", None) - mobile_download = search_request_object.get("mobiledownload", None) + search_request = kwargs.get("search_request") + export = search_request.get("export", None) + mobile_download = search_request.get("mobiledownload", None) page = ( 1 - if search_request_object.get(self.componentname) == "" - or isinstance(search_request_object.get(self.componentname), dict) - else int(search_request_object.get(self.componentname, 1)) + if search_request.get(self.componentname) == "" + or isinstance(search_request.get(self.componentname), dict) + else int(search_request.get(self.componentname, 1)) ) if export is not None: limit = settings.SEARCH_RESULT_LIMIT elif mobile_download is not None: - limit = search_request_object.get("resourcecount") + limit = search_request.get("resourcecount") else: limit = settings.SEARCH_ITEMS_PER_PAGE - limit = int(search_request_object.get("limit", limit)) + limit = int(search_request.get("limit", limit)) search_query_object["query"].start = limit * int(page - 1) search_query_object["query"].limit = limit def post_search_hook(self, search_query_object, response_object, **kwargs): - search_request_object = kwargs.get("search_request_object", self.request.GET) + search_request = kwargs.get("search_request") total = ( response_object["results"]["hits"]["total"]["value"] if response_object["results"]["hits"]["total"]["value"] @@ -47,9 +47,9 @@ def post_search_hook(self, search_query_object, response_object, **kwargs): ) page = ( 1 - if search_request_object.get(self.componentname) == "" - or isinstance(search_request_object.get(self.componentname), dict) - else int(search_request_object.get(self.componentname, 1)) + if search_request.get(self.componentname) == "" + or isinstance(search_request.get(self.componentname), dict) + else int(search_request.get(self.componentname, 1)) ) paginator, pages = get_paginator( diff --git a/arches/app/search/components/standard_search_view.py b/arches/app/search/components/standard_search_view.py index b7c40c2af0e..3545be150f6 100644 --- a/arches/app/search/components/standard_search_view.py +++ b/arches/app/search/components/standard_search_view.py @@ -122,7 +122,6 @@ class StandardSearchView(BaseSearchView): def append_dsl(self, search_query_object, **kwargs): - search_request_object = kwargs.get("search_request_object", self.request.GET) search_query_object["query"].include("graph_id") search_query_object["query"].include("root_ontology_class") search_query_object["query"].include("resourceinstanceid") @@ -133,16 +132,15 @@ def append_dsl(self, search_query_object, **kwargs): search_query_object["query"].include("map_popup") search_query_object["query"].include("provisional_resource") search_query_object["query"].include("permissions") - load_tiles = get_str_kwarg_as_bool("tiles", search_request_object) + load_tiles = get_str_kwarg_as_bool("tiles", self.search_request) if load_tiles: search_query_object["query"].include("tiles") def execute_query(self, search_query_object, response_object, **kwargs): - search_request_object = kwargs.get("search_request_object", self.request.GET) - for_export = get_str_kwarg_as_bool("export", search_request_object) - pages = search_request_object.get("pages", None) - total = int(search_request_object.get("total", "0")) - resourceinstanceid = search_request_object.get("id", None) + for_export = get_str_kwarg_as_bool("export", self.search_request) + pages = self.search_request.get("pages", None) + total = int(self.search_request.get("total", "0")) + resourceinstanceid = self.search_request.get("id", None) dsl = search_query_object["query"] if for_export or pages: results = dsl.search(index=RESOURCES_INDEX, scroll="1m") @@ -208,13 +206,10 @@ def handle_search_results_query( se = SearchEngineFactory().create() search_query_object = {"query": Query(se)} response_object = {"results": None} - sorted_query_obj = search_filter_factory.create_search_query_dict( - list(self.request.GET.items()) + list(self.request.POST.items()) - ) permitted_nodegroups = get_permitted_nodegroups(self.request.user) include_provisional = get_provisional_type(self.request) try: - for filter_type, querystring in list(sorted_query_obj.items()): + for filter_type, querystring in list(self.search_request.items()): search_filter = search_filter_factory.get_filter(filter_type) if search_filter: search_filter.append_dsl( @@ -222,7 +217,7 @@ def handle_search_results_query( permitted_nodegroups=permitted_nodegroups, include_provisional=include_provisional, querystring=querystring, - search_request_object=sorted_query_obj, + search_request=self.search_request, ) append_instance_permission_filter_dsl(self.request, search_query_object) except Exception as err: @@ -235,25 +230,25 @@ def handle_search_results_query( if returnDsl: return response_object, search_query_object - for filter_type, querystring in list(sorted_query_obj.items()): + for filter_type, querystring in list(self.search_request.items()): search_filter = search_filter_factory.get_filter(filter_type) if search_filter: search_filter.execute_query( search_query_object, response_object, - search_request_object=sorted_query_obj, + search_request=self.search_request, ) if response_object["results"] is not None: # allow filters to modify the results - for filter_type, querystring in list(sorted_query_obj.items()): + for filter_type, querystring in list(self.search_request.items()): search_filter = search_filter_factory.get_filter(filter_type) if search_filter: search_filter.post_search_hook( search_query_object, response_object, permitted_nodegroups=permitted_nodegroups, - search_request_object=sorted_query_obj, + search_request=self.search_request, ) search_query_object.pop("query") diff --git a/arches/app/search/components/term_filter.py b/arches/app/search/components/term_filter.py index 23d8223ff5c..4620b655fe9 100644 --- a/arches/app/search/components/term_filter.py +++ b/arches/app/search/components/term_filter.py @@ -34,8 +34,8 @@ def append_dsl(self, search_query_object, **kwargs): include_provisional = kwargs.get("include_provisional") search_query = Bool() querystring_params = kwargs.get("querystring", "[]") - search_request_object = kwargs.get("search_request_object", self.request.GET) - language = search_request_object.get("language", "*") + search_request = kwargs.get("search_request") + language = search_request.get("language", "*") for term in JSONDeserializer().deserialize(querystring_params): if term["type"] == "term" or term["type"] == "string": string_filter = Bool() From e68f68b680ab6037dbbe4bdb5e39ab0b90354ca4 Mon Sep 17 00:00:00 2001 From: Galen Date: Tue, 19 Nov 2024 22:26:28 -0800 Subject: [PATCH 6/9] move self.search_request into BaseSearchFilter via SearchFilterFactory, re #11578 --- arches/app/search/components/base.py | 18 ++++++++++----- .../app/search/components/base_search_view.py | 16 ++++++++------ arches/app/search/components/paging_filter.py | 22 +++++++++---------- arches/app/search/components/term_filter.py | 3 +-- 4 files changed, 33 insertions(+), 26 deletions(-) diff --git a/arches/app/search/components/base.py b/arches/app/search/components/base.py index b0b6e06cf46..146e981b18f 100644 --- a/arches/app/search/components/base.py +++ b/arches/app/search/components/base.py @@ -9,8 +9,11 @@ class BaseSearchFilter: - def __init__(self, request=None, user=None, componentname=None): + def __init__( + self, request=None, search_request=None, user=None, componentname=None + ): self.request = request + self.search_request = search_request self.user = user self.componentname = componentname @@ -54,6 +57,13 @@ def __init__(self, request=None, user=None): for search_filter in SearchComponent.objects.all() } self.search_filters_instances = {} + request_object = ( + self.request.GET if self.request.method == "GET" else self.request.POST + ) + request_object = request_object.dict() + self.search_request = self.create_search_query_dict( + list(request_object.items()) + ) def get_filter(self, componentname): if componentname in self.search_filters: @@ -71,7 +81,7 @@ def get_filter(self, componentname): ) if class_method: filter_instance = class_method( - self.request, self.user, componentname + self.request, self.search_request, self.user, componentname ) self.search_filters_instances[search_filter.componentname] = ( filter_instance @@ -83,10 +93,8 @@ def get_filter(self, componentname): def get_searchview_name(self): if not self.request: searchview_component_name = None - elif self.request.method == "POST": - searchview_component_name = self.request.POST.get("search-view", None) else: - searchview_component_name = self.request.GET.get("search-view", None) + searchview_component_name = self.search_request.get("search-view", None) if not searchview_component_name: # get default search_view component diff --git a/arches/app/search/components/base_search_view.py b/arches/app/search/components/base_search_view.py index 6a7dcc04118..a654c9c2d81 100644 --- a/arches/app/search/components/base_search_view.py +++ b/arches/app/search/components/base_search_view.py @@ -48,8 +48,15 @@ class BaseSearchView(BaseSearchFilter): how to execute a search in the search_results method """ - def __init__(self, request=None, user=None, componentname=None): - super().__init__(request=request, user=user, componentname=componentname) + def __init__( + self, request=None, search_request=None, user=None, componentname=None + ): + super().__init__( + request=request, + search_request=search_request, + user=user, + componentname=componentname, + ) self.searchview_component = SearchComponent.objects.get( componentname=componentname ) @@ -95,11 +102,6 @@ def __init__(self, request=None, user=None, componentname=None): item.componentname, float("inf") ), ) - request_object = ( - self.request.GET if self.request.method == "GET" else self.request.POST - ) - request_object = request_object.dict() - self.search_request = self.create_query_dict(request_object) @property def required_search_filters(self): diff --git a/arches/app/search/components/paging_filter.py b/arches/app/search/components/paging_filter.py index 1ef6217572e..f6437d1cadd 100644 --- a/arches/app/search/components/paging_filter.py +++ b/arches/app/search/components/paging_filter.py @@ -17,28 +17,26 @@ class PagingFilter(BaseSearchFilter): def append_dsl(self, search_query_object, **kwargs): - search_request = kwargs.get("search_request") - export = search_request.get("export", None) - mobile_download = search_request.get("mobiledownload", None) + export = self.search_request.get("export", None) + mobile_download = self.search_request.get("mobiledownload", None) page = ( 1 - if search_request.get(self.componentname) == "" - or isinstance(search_request.get(self.componentname), dict) - else int(search_request.get(self.componentname, 1)) + if self.search_request.get(self.componentname) == "" + or isinstance(self.search_request.get(self.componentname), dict) + else int(self.search_request.get(self.componentname, 1)) ) if export is not None: limit = settings.SEARCH_RESULT_LIMIT elif mobile_download is not None: - limit = search_request.get("resourcecount") + limit = self.search_request.get("resourcecount") else: limit = settings.SEARCH_ITEMS_PER_PAGE - limit = int(search_request.get("limit", limit)) + limit = int(self.search_request.get("limit", limit)) search_query_object["query"].start = limit * int(page - 1) search_query_object["query"].limit = limit def post_search_hook(self, search_query_object, response_object, **kwargs): - search_request = kwargs.get("search_request") total = ( response_object["results"]["hits"]["total"]["value"] if response_object["results"]["hits"]["total"]["value"] @@ -47,9 +45,9 @@ def post_search_hook(self, search_query_object, response_object, **kwargs): ) page = ( 1 - if search_request.get(self.componentname) == "" - or isinstance(search_request.get(self.componentname), dict) - else int(search_request.get(self.componentname, 1)) + if self.search_request.get(self.componentname) == "" + or isinstance(self.search_request.get(self.componentname), dict) + else int(self.search_request.get(self.componentname, 1)) ) paginator, pages = get_paginator( diff --git a/arches/app/search/components/term_filter.py b/arches/app/search/components/term_filter.py index 4620b655fe9..17b2f000032 100644 --- a/arches/app/search/components/term_filter.py +++ b/arches/app/search/components/term_filter.py @@ -34,8 +34,7 @@ def append_dsl(self, search_query_object, **kwargs): include_provisional = kwargs.get("include_provisional") search_query = Bool() querystring_params = kwargs.get("querystring", "[]") - search_request = kwargs.get("search_request") - language = search_request.get("language", "*") + language = self.search_request.get("language", "*") for term in JSONDeserializer().deserialize(querystring_params): if term["type"] == "term" or term["type"] == "string": string_filter = Bool() From 9f46aa9a479da9afe4867e86a6351722735bab18 Mon Sep 17 00:00:00 2001 From: Galen Date: Tue, 19 Nov 2024 22:29:51 -0800 Subject: [PATCH 7/9] rm search_request as kwarg given self has it now, re #11578 --- arches/app/search/components/standard_search_view.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/arches/app/search/components/standard_search_view.py b/arches/app/search/components/standard_search_view.py index 3545be150f6..2805edc684b 100644 --- a/arches/app/search/components/standard_search_view.py +++ b/arches/app/search/components/standard_search_view.py @@ -217,7 +217,6 @@ def handle_search_results_query( permitted_nodegroups=permitted_nodegroups, include_provisional=include_provisional, querystring=querystring, - search_request=self.search_request, ) append_instance_permission_filter_dsl(self.request, search_query_object) except Exception as err: @@ -236,7 +235,6 @@ def handle_search_results_query( search_filter.execute_query( search_query_object, response_object, - search_request=self.search_request, ) if response_object["results"] is not None: @@ -248,7 +246,6 @@ def handle_search_results_query( search_query_object, response_object, permitted_nodegroups=permitted_nodegroups, - search_request=self.search_request, ) search_query_object.pop("query") From 9abbbba305aadb80f6cc8f9eb92441da0406a636 Mon Sep 17 00:00:00 2001 From: Galen Date: Tue, 19 Nov 2024 23:38:36 -0800 Subject: [PATCH 8/9] resolve race conditions between searchfilter factory and searchview, re #11578 --- arches/app/search/components/base.py | 4 +--- arches/app/search/components/base_search_view.py | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arches/app/search/components/base.py b/arches/app/search/components/base.py index 146e981b18f..c69f551048d 100644 --- a/arches/app/search/components/base.py +++ b/arches/app/search/components/base.py @@ -61,9 +61,7 @@ def __init__(self, request=None, user=None): self.request.GET if self.request.method == "GET" else self.request.POST ) request_object = request_object.dict() - self.search_request = self.create_search_query_dict( - list(request_object.items()) - ) + self.search_request = request_object def get_filter(self, componentname): if componentname in self.search_filters: diff --git a/arches/app/search/components/base_search_view.py b/arches/app/search/components/base_search_view.py index a654c9c2d81..9b028d6a9a7 100644 --- a/arches/app/search/components/base_search_view.py +++ b/arches/app/search/components/base_search_view.py @@ -102,6 +102,7 @@ def __init__( item.componentname, float("inf") ), ) + self.search_request = self.create_query_dict(self.search_request) @property def required_search_filters(self): From 3efea567d02f43c31e4e4f2f0b12ce4fb79316db Mon Sep 17 00:00:00 2001 From: Galen Date: Tue, 19 Nov 2024 23:44:56 -0800 Subject: [PATCH 9/9] rm redundant assignment, re #11578 --- arches/app/search/components/base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arches/app/search/components/base.py b/arches/app/search/components/base.py index c69f551048d..abbdcb4175d 100644 --- a/arches/app/search/components/base.py +++ b/arches/app/search/components/base.py @@ -60,8 +60,7 @@ def __init__(self, request=None, user=None): request_object = ( self.request.GET if self.request.method == "GET" else self.request.POST ) - request_object = request_object.dict() - self.search_request = request_object + self.search_request = request_object.dict() def get_filter(self, componentname): if componentname in self.search_filters: