Skip to content
Snippets Groups Projects
Verified Commit 10b0035c authored by Frank Sauerburger's avatar Frank Sauerburger
Browse files

Improve fallback path

parent eeff530c
No related branches found
No related tags found
No related merge requests found
......@@ -20,10 +20,11 @@ for title, _ in titles.values():
def suggest():
"""Serve movie title suggestions"""
query = request.args.get("q")
if not query:
return {}
results = []
if query:
results = index.search(query)
results = index.search(query)
return {
"suggestions": results[:100]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment