mirror of
https://github.com/searxng/searxng.git
synced 2024-11-26 21:01:01 +00:00
[fix] autocompleter error handling
This commit is contained in:
parent
39c3f5658e
commit
aff33ea896
1 changed files with 2 additions and 2 deletions
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue