Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aff33ea8 authored by Adam Tauber's avatar Adam Tauber
Browse files

[fix] autocompleter error handling

parent 39c3f565
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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())