fixes
[wolnelektury.git] / src / search / views.py
index 6ff0f7a..b5cc0ba 100644 (file)
@@ -123,7 +123,7 @@ def search(request):
     filters = SearchFilters(request.GET)
     ctx = {
         'title': 'Wynik wyszukiwania',
-        'query': filters.data['q'],
+        'query': request.GET.get('q', ''),
         'filters': filters,
     }
     if filters.is_valid():
@@ -137,8 +137,7 @@ def search(request):
 
 @cache.never_cache
 def main(request):
-    if request.EXPERIMENTS['search'].value:
-        request.EXPERIMENTS['layout'].override(True)
+    if request.EXPERIMENTS['layout'].value:
         return search(request)
 
     query = request.GET.get('q', '')