mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-08 02:10:24 +00:00
enable enter emails
This commit is contained in:
@@ -500,6 +500,9 @@ class SearchUser(APIView):
|
|||||||
if username in search_result:
|
if username in search_result:
|
||||||
search_result.remove(username)
|
search_result.remove(username)
|
||||||
|
|
||||||
|
if is_valid_username(q) and q not in search_result:
|
||||||
|
search_result.insert(0, q)
|
||||||
|
|
||||||
formated_result = format_user_result(search_result)[:10]
|
formated_result = format_user_result(search_result)[:10]
|
||||||
return HttpResponse(json.dumps({"users": formated_result}), status=200,
|
return HttpResponse(json.dumps({"users": formated_result}), status=200,
|
||||||
content_type=json_content_type)
|
content_type=json_content_type)
|
||||||
|
Reference in New Issue
Block a user