mirror of
https://github.com/haiwen/seahub.git
synced 2025-07-18 17:22:05 +00:00
check if group existes before get group name
This commit is contained in:
parent
81b49a6e72
commit
f510b8fe24
@ -362,6 +362,7 @@ class AdminLogsSharePermissionLogs(APIView):
|
|||||||
for group_id in to_group_id_set:
|
for group_id in to_group_id_set:
|
||||||
if group_id not in to_group_name_dict:
|
if group_id not in to_group_name_dict:
|
||||||
group = ccnet_api.get_group(int(group_id))
|
group = ccnet_api.get_group(int(group_id))
|
||||||
|
if group:
|
||||||
to_group_name_dict[group_id] = group.group_name
|
to_group_name_dict[group_id] = group.group_name
|
||||||
if group.parent_group_id != 0:
|
if group.parent_group_id != 0:
|
||||||
department_set.add(group_id)
|
department_set.add(group_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user