From 0b6ce79c1f651bb34449b98390bf7ee5c7dd9377 Mon Sep 17 00:00:00 2001 From: Mikko Koho Date: Tue, 17 Nov 2015 16:31:41 +0200 Subject: [PATCH] Don't hide datasetless organizations in search results --- ckanext/kata/controllers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ckanext/kata/controllers.py b/ckanext/kata/controllers.py index 16d832ec..bc7934e7 100644 --- a/ckanext/kata/controllers.py +++ b/ckanext/kata/controllers.py @@ -1174,7 +1174,8 @@ def index(self): } global_results = self._action('group_list')(context, data_dict_global_results) - global_results = [org for org in global_results if org.get('package_count', 0) > 0] + if not q: + global_results = [org for org in global_results if org.get('package_count', 0) > 0] page_results_start = items_per_page * (page - 1) page_results_end = page_results_start + items_per_page