diff --git a/core/views/site.py b/core/views/site.py index 8eedcf67..3b75cdde 100644 --- a/core/views/site.py +++ b/core/views/site.py @@ -71,6 +71,8 @@ def notification(request, notif_id): def search_user(query, as_json=False): + if query == "": + return [] res = SearchQuerySet().models(User).autocomplete(auto=query)[:20] return [r.object for r in res] diff --git a/forum/templates/forum/search.jinja b/forum/templates/forum/search.jinja index 4d15714a..fed3803e 100644 --- a/forum/templates/forum/search.jinja +++ b/forum/templates/forum/search.jinja @@ -4,9 +4,9 @@ {% block content %}