mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
core: fix whitespaces in user and forum search
This commit is contained in:
@ -71,7 +71,7 @@ def notification(request, notif_id):
|
||||
|
||||
|
||||
def search_user(query, as_json=False):
|
||||
if query == "":
|
||||
if query == "" or query.isspace():
|
||||
return []
|
||||
res = SearchQuerySet().models(User).autocomplete(auto=query)[:20]
|
||||
return [r.object for r in res]
|
||||
|
Reference in New Issue
Block a user