2 Commits 5c1fa8f52c ... 57b1c2dd27

Autor SHA1 Mensaje Fecha
  LuoChinWen 57b1c2dd27 Merge branch 'dev' of http://192.168.0.3:3000/CRBC-MaaS-Platform-Project/LQAdminPlatform into dev hace 1 mes
  LuoChinWen a45065a581 -fix:修复了导出问题 hace 1 mes
Se han modificado 1 ficheros con 7 adiciones y 0 borrados
  1. 7 0
      src/app/services/task_service.py

+ 7 - 0
src/app/services/task_service.py

@@ -905,6 +905,13 @@ class TaskService:
             api_base_url = config_handler.get('external_api', 'project_api_url', 'http://192.168.92.61:9003/api/external/projects').rstrip('/')
             api_base_url = config_handler.get('external_api', 'project_api_url', 'http://192.168.92.61:9003/api/external/projects').rstrip('/')
             api_url = f"{api_base_url}/init"
             api_url = f"{api_base_url}/init"
             token = config_handler.get('external_api', 'admin_token', '')
             token = config_handler.get('external_api', 'admin_token', '')
+            
+            # 清理token值:去除可能的引号和空格
+            if token:
+                token = token.strip().strip('"').strip("'")
+            
+            if not token:
+                return False, "外部平台Token未配置"
 
 
             # 3. 发送请求 (不持有数据库连接)
             # 3. 发送请求 (不持有数据库连接)
             async with httpx.AsyncClient(timeout=120.0) as client: # 增加超时时间到 120s
             async with httpx.AsyncClient(timeout=120.0) as client: # 增加超时时间到 120s