1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 06:33:48 +00:00

Revert "[api] update search user api"

This reverts commit c33941e0e4.
This commit is contained in:
lian
2015-12-09 16:53:31 +08:00
parent 41ff991f2b
commit ce77796a49
2 changed files with 11 additions and 50 deletions

View File

@@ -360,15 +360,13 @@ class SearchUser(APIView):
# remove duplicate emails
search_result = {}.fromkeys(search_result).keys()
try:
include_self = int(request.GET.get('include_self', 1))
except ValueError:
include_self = 1
if include_self == 0 and username in search_result:
# reomve myself
# reomve myself
if username in search_result:
search_result.remove(username)
if is_valid_username(q) and q not in search_result:
search_result.insert(0, q)
try:
size = int(request.GET.get('avatar_size', 32))
except ValueError: