[GMG-Devel] [PATCH 30/83] fix parameters in search views

Alon Levy alon at pobox.com
Tue Feb 25 14:58:13 EST 2014


From: Praveen Kumar <praveen97uma at gmail.com>

---
 mediagoblin/plugins/search/views.py | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/mediagoblin/plugins/search/views.py b/mediagoblin/plugins/search/views.py
index 6030206..343e362 100644
--- a/mediagoblin/plugins/search/views.py
+++ b/mediagoblin/plugins/search/views.py
@@ -13,15 +13,10 @@ def search_in_indices(request, query):
     indices = registry.IndexRegistry.indices()
     all_results = []
     for index in indices.itervalues():
-        results = index.search(query)
+        results = index.search(query, request)
         if len(results)>0:
-            for result in results:
-                obj_id = result['id']
-                obj = index.model.query.get(obj_id)
-                all_results.append({
-                    'slug': obj.slug,
-                    'url': obj.url_for_self(request.urlgen),
-                })
+            all_results.extend(results)
+    
     return all_results
 
 def search(request):
-- 
1.8.5.3



More information about the devel mailing list