1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-02 15:57:31 +00:00

Merge pull request #4975 from haiwen/admin-permission-log

check if group existes before get group name
This commit is contained in:
Daniel Pan 2021-08-22 14:34:38 +08:00 committed by GitHub
commit 65d3107a0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -362,9 +362,10 @@ class AdminLogsSharePermissionLogs(APIView):
for group_id in to_group_id_set:
if group_id not in to_group_name_dict:
group = ccnet_api.get_group(int(group_id))
to_group_name_dict[group_id] = group.group_name
if group.parent_group_id != 0:
department_set.add(group_id)
if group:
to_group_name_dict[group_id] = group.group_name
if group.parent_group_id != 0:
department_set.add(group_id)
events_info = []
for ev in events: