瀏覽代碼

fix: 全体员工跳过 scope_modify 调用

alphah 2 周之前
父節點
當前提交
b6924a2052
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      backend/app/plugin/module_payment/expense/institution/controller.py

+ 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,