[fix] autocompleter error handling

This commit is contained in:
Adam Tauber 2015-01-10 15:27:42 +01:00
parent 39c3f5658e
commit aff33ea896
1 changed files with 2 additions and 2 deletions

View File

@ -343,14 +343,14 @@ def autocompleter():
# check if search query is set
if not query.getSearchQuery():
return
return '', 400
# run autocompleter
completer = autocomplete_backends.get(request.cookies.get('autocomplete'))
# check if valid autocompleter is selected
if not completer:
return
return '', 400
# run autocompletion
raw_results = completer(query.getSearchQuery())