X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/801a05d2ff33bb8a3c1a46ea0c657825b2787fa7..eb383b976ed875888b261bf5901ee484aa2dcf8f:/src/search/views.py?ds=inline diff --git a/src/search/views.py b/src/search/views.py index 6ff0f7ab6..b5cc0baa3 100644 --- a/src/search/views.py +++ b/src/search/views.py @@ -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', '')