Commit 85602fe3 by benjaoming

Fix #125 - missing redirect call

parent 807611b9
...@@ -473,7 +473,7 @@ class SearchView(ListView): ...@@ -473,7 +473,7 @@ class SearchView(ListView):
def dispatch(self, request, *args, **kwargs): def dispatch(self, request, *args, **kwargs):
# Do not allow anonymous users to search if they cannot read content # Do not allow anonymous users to search if they cannot read content
if request.user.is_anonymous and not settings.ANONYMOUS: if request.user.is_anonymous and not settings.ANONYMOUS:
return(settings.LOGIN_URL) return redirect(settings.LOGIN_URL)
self.search_form = forms.SearchForm(request.GET) self.search_form = forms.SearchForm(request.GET)
if self.search_form.is_valid(): if self.search_form.is_valid():
self.query = self.search_form.cleaned_data['query'] self.query = self.search_form.cleaned_data['query']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment