[fix] /autocompleter: return HTTP 400 when q is empty as intent.

Fix commit c225db45c8
This commit is contained in:
Alexandre Flament 2020-09-21 19:14:24 +02:00
parent ecf5899153
commit 2fd582d457

View file

@ -736,7 +736,7 @@ def autocompleter():
disabled_engines = request.preferences.engines.get_disabled() disabled_engines = request.preferences.engines.get_disabled()
# parse query # parse query
raw_text_query = RawTextQuery(str(request.form.get('q', b'')), disabled_engines) raw_text_query = RawTextQuery(request.form.get('q', ''), disabled_engines)
# check if search query is set # check if search query is set
if not raw_text_query.getSearchQuery(): if not raw_text_query.getSearchQuery():