mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user