Browse Source

fix: 全体员工跳过 scope_modify 调用

alphah 2 tuần trước cách đây
mục cha
commit
b6924a2052

+ 2 - 2
backend/app/plugin/module_payment/expense/institution/controller.py

@@ -101,8 +101,8 @@ async def create_institution_controller(
     # 解析适用成员数据
     scope_data = None
     adapter_type = data.get("applicable_scope")
-    if adapter_type and adapter_type not in ("NONE", "none"):
-        ADAPTER_TYPE_MAP = {"all": "ALL", "employee": "EMPLOYEE_SELECT", "department": "DEPARTMENT_SELECT"}
+    if adapter_type and adapter_type not in ("NONE", "none", "all"):
+        ADAPTER_TYPE_MAP = {"employee": "EMPLOYEE_SELECT", "department": "DEPARTMENT_SELECT"}
         mapped_adapter = ADAPTER_TYPE_MAP.get(adapter_type, adapter_type)
         scope_data = {
             "adapter_type": mapped_adapter,