mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 09:21:54 +00:00
return members when admin get address book group
This commit is contained in:
@@ -184,7 +184,20 @@ class AdminAddressBookGroup(APIView):
|
|||||||
for group in groups:
|
for group in groups:
|
||||||
ret_groups.append(address_book_group_to_dict(group))
|
ret_groups.append(address_book_group_to_dict(group))
|
||||||
|
|
||||||
|
try:
|
||||||
|
members = ccnet_api.get_group_members(group_id)
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(e)
|
||||||
|
error_msg = 'Internal Server Error'
|
||||||
|
return api_error(status.HTTP_500_INTERNAL_SERVER_ERROR, error_msg)
|
||||||
|
|
||||||
|
for m in members:
|
||||||
|
member_info = self._get_address_book_group_memeber_info(request,
|
||||||
|
m, avatar_size)
|
||||||
|
ret_members.append(member_info)
|
||||||
|
|
||||||
ret_dict['groups'] = ret_groups
|
ret_dict['groups'] = ret_groups
|
||||||
|
ret_dict['members'] = ret_members
|
||||||
|
|
||||||
if return_ancestors:
|
if return_ancestors:
|
||||||
# get ancestor groups and remove last group which is self
|
# get ancestor groups and remove last group which is self
|
||||||
|
Reference in New Issue
Block a user