mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-21 10:43:36 +00:00
fix: manual node setup 'Node ID Required' error
Fixed issue where discovered nodes and manual node setup would incorrectly call updateNode instead of addNode. The problem was that discovered nodes were set with an empty string ID, which made the code think it was editing an existing node. Now properly checks for both editingNode existence AND a valid ID before deciding whether to update or add. Fixes #289
This commit is contained in:
@@ -1727,8 +1727,8 @@ docker run -d \
|
||||
editingNode={editingNode() ?? undefined}
|
||||
onSave={async (nodeData) => {
|
||||
try {
|
||||
if (editingNode()) {
|
||||
// Update existing node
|
||||
if (editingNode() && editingNode()!.id) {
|
||||
// Update existing node (only if it has a valid ID)
|
||||
await NodesAPI.updateNode(editingNode()!.id, nodeData as NodeConfig);
|
||||
|
||||
// Update local state
|
||||
|
||||
Reference in New Issue
Block a user