From 533ee32e9c01a56f9ca5baf84be687c2c5cce213 Mon Sep 17 00:00:00 2001 From: alexandru-m-g Date: Tue, 2 Jul 2024 01:55:11 +0300 Subject: [PATCH] HDX-9945 Removing unnecessary code --- .../controller_logic/search_logic.py | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/ckanext-hdx_search/ckanext/hdx_search/controller_logic/search_logic.py b/ckanext-hdx_search/ckanext/hdx_search/controller_logic/search_logic.py index 4bb0cc8e36..6d83027336 100644 --- a/ckanext-hdx_search/ckanext/hdx_search/controller_logic/search_logic.py +++ b/ckanext-hdx_search/ckanext/hdx_search/controller_logic/search_logic.py @@ -155,7 +155,7 @@ def _search(self, additional_fq='', additional_facets=None, self.template_data.sort_by_fields = [field.split()[0] for field in sort_by.split(',')] - self._set_other_links() + self.template_data.other_links = {'current_page_url': self._current_url()} search_extras = {} try: @@ -414,29 +414,6 @@ def _set_search_url_params(self): params_nopage = self._params_nopage() self.template_data['search_url_params'] = urlencode(_encode_params(params_nopage)) - def _set_other_links(self, suffix='', other_params_dict=None): - url_param_list = ['sort', 'q', 'organization', 'tags', - 'vocab_Topics', 'license_id', 'groups', 'res_format', '_show_filters'] - # named_route = self._get_named_route() - params = {} - - for k, v in request.args.items(): - if k in url_param_list: - if k in params: - params[k].append(v) - else: - params[k] = [v] - - if other_params_dict: - params.update(other_params_dict) - - self.template_data.other_links = {} - self.template_data.other_links['params_noq'] = {k: v for k, v in params.items() - if k not in ['q', '_show_filters', 'id']} - self.template_data.other_links['params_nosort_noq'] = {k: v for k, v in params.items() - if k not in ['sort', 'q', 'id']} - self.template_data.other_links['current_page_url'] = self._current_url() - def _current_url(self): url = h.url_for('hdx_light_dataset.search') return url