修复节点已存在时无法覆盖安装的问题
This commit is contained in:
parent
a964723dd2
commit
df7898538b
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user