From fdbd37eb2516b67ca41b0b71b738e3368e2825fe Mon Sep 17 00:00:00 2001 From: xuyonghao <898441624@qq.com> Date: 星期五, 27 十二月 2024 11:33:47 +0800 Subject: [PATCH] 用户所属部门与角色所属部门过滤 --- app/service/organization.py | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/app/service/organization.py b/app/service/organization.py index 0954c6c..608cbf2 100644 --- a/app/service/organization.py +++ b/app/service/organization.py @@ -113,6 +113,10 @@ next_dept_list = [] base_dept = db.query(OrganizationModel).filter(OrganizationModel.id.__eq__(dept_id)).first() if status == DEPT_STATUS_ON: + print(11) + print(base_dept.name) + if base_dept.parent and base_dept.parent.status != DEPT_STATUS_ON: + return '涓婄骇鑺傜偣鐘舵�佸紓甯革紒' try: base_dept.status=status db.commit() -- Gitblit v1.8.0