fix(api): edit employee depart with rid=0 (#420)

This commit is contained in:
simontigers 2024-03-12 17:46:50 +08:00 committed by GitHub
parent 34204ec4c6
commit 7a170ab397
1 changed files with 14 additions and 15 deletions

View File

@ -49,8 +49,7 @@ def edit_employee_department_in_acl(e_list, new_d_id, op_uid):
continue
old_d_rid_in_acl = role_map.get(old_department.department_name, 0)
if old_d_rid_in_acl == 0:
return
if old_d_rid_in_acl > 0:
if old_d_rid_in_acl != old_department.acl_rid:
old_department.update(
acl_rid=old_d_rid_in_acl