perf: 优化部分ids字符串分割写法

This commit is contained in:
insistence
2024-07-15 21:24:17 +08:00
parent d1b6db4769
commit 2263897111
15 changed files with 19 additions and 19 deletions

View File

@@ -100,7 +100,7 @@ async def delete_system_dept(
current_user: CurrentUserModel = Depends(LoginService.get_current_user),
data_scope_sql: str = Depends(GetDataScope('SysDept')),
):
dept_id_list = dept_ids.split(',')
dept_id_list = dept_ids.split(',') if dept_ids else []
if dept_id_list:
for dept_id in dept_id_list:
if not current_user.user.admin: