[fix] autocompleter error handling

This commit is contained in:
Adam Tauber 2015-01-10 15:27:42 +01:00
parent 39c3f5658e
commit aff33ea896

View File

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