mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 21:07:28 -08:00
fix(core): Do not remove empty output connections arrays in PurgeInvalidWorkflowConnections migration (#5546)
fix(cli): Do not remove empty output connections arrays in PurgeInvalidWorkflowConnections migration
This commit is contained in:
parent
8d84e684cf
commit
0fbb3f0f02
|
@ -58,22 +58,7 @@ export class PurgeInvalidWorkflowConnections1675940580449 implements MigrationIn
|
|||
!nodesThatCannotReceiveInput.includes(outgoingConnections.node),
|
||||
);
|
||||
});
|
||||
|
||||
// Filter out output connection items that are empty
|
||||
connection[outputConnectionName] = connection[outputConnectionName].filter(
|
||||
(item) => item.length > 0,
|
||||
);
|
||||
|
||||
// Delete the output connection container if it is empty
|
||||
if (connection[outputConnectionName].length === 0) {
|
||||
delete connection[outputConnectionName];
|
||||
}
|
||||
});
|
||||
|
||||
// Finally delete the source node if it has no output connections
|
||||
if (Object.keys(connection).length === 0) {
|
||||
delete connections[sourceNodeName];
|
||||
}
|
||||
});
|
||||
|
||||
// Update database with new connections
|
||||
|
|
|
@ -50,22 +50,7 @@ export class PurgeInvalidWorkflowConnections1675940580449 implements MigrationIn
|
|||
!nodesThatCannotReceiveInput.includes(outgoingConnections.node),
|
||||
);
|
||||
});
|
||||
|
||||
// Filter out output connection items that are empty
|
||||
connection[outputConnectionName] = connection[outputConnectionName].filter(
|
||||
(item) => item.length > 0,
|
||||
);
|
||||
|
||||
// Delete the output connection container if it is empty
|
||||
if (connection[outputConnectionName].length === 0) {
|
||||
delete connection[outputConnectionName];
|
||||
}
|
||||
});
|
||||
|
||||
// Finally delete the source node if it has no output connections
|
||||
if (Object.keys(connection).length === 0) {
|
||||
delete connections[sourceNodeName];
|
||||
}
|
||||
});
|
||||
|
||||
// Update database with new connections
|
||||
|
|
|
@ -51,22 +51,7 @@ export class PurgeInvalidWorkflowConnections1675940580449 implements MigrationIn
|
|||
!nodesThatCannotReceiveInput.includes(outgoingConnections.node),
|
||||
);
|
||||
});
|
||||
|
||||
// Filter out output connection items that are empty
|
||||
connection[outputConnectionName] = connection[outputConnectionName].filter(
|
||||
(item) => item.length > 0,
|
||||
);
|
||||
|
||||
// Delete the output connection container if it is empty
|
||||
if (connection[outputConnectionName].length === 0) {
|
||||
delete connection[outputConnectionName];
|
||||
}
|
||||
});
|
||||
|
||||
// Finally delete the source node if it has no output connections
|
||||
if (Object.keys(connection).length === 0) {
|
||||
delete connections[sourceNodeName];
|
||||
}
|
||||
});
|
||||
|
||||
// Update database with new connections
|
||||
|
|
Loading…
Reference in a new issue