From df7898538b84be55a2799e50149a84d50af1a2fc Mon Sep 17 00:00:00 2001 From: jingrow Date: Mon, 3 Nov 2025 03:41:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8A=82=E7=82=B9=E5=B7=B2?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E6=97=B6=E6=97=A0=E6=B3=95=E8=A6=86=E7=9B=96?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/jingrow/jingrow/api/node_management.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/jingrow/jingrow/api/node_management.py b/apps/jingrow/jingrow/api/node_management.py index 35fed8b..66ba0ac 100644 --- a/apps/jingrow/jingrow/api/node_management.py +++ b/apps/jingrow/jingrow/api/node_management.py @@ -565,8 +565,11 @@ def _install_single_node_directory(node_dir: str) -> Dict[str, Any]: } if exists_res.get("success"): - # 更新现有记录,使用 node_type 作为 name - res = update_record("Local Ai Node", node_type, payload) + # 更新现有记录,使用 get_record_id 返回的 name(根据 node_type 查找得到的) + record_name = exists_res.get('name') + if not record_name: + return {'success': False, 'error': '获取记录名称失败'} + res = update_record("Local Ai Node", record_name, payload) else: # 创建新记录 res = create_record("Local Ai Node", payload)