fix(ui): fix frontend workflow migration when node is missing version

This should default to "1.0.0" to match the behaviour of the backend.
This commit is contained in:
psychedelicious 2023-12-14 09:12:54 +11:00
parent bb986b97f3
commit 442ac2b828

View File

@ -64,7 +64,10 @@ const migrateV1toV2 = (workflowToMigrate: WorkflowV1): WorkflowV2 => {
const nodePack = invocationTemplate
? invocationTemplate.nodePack
: t('common.unknown');
(node.data as unknown as InvocationNodeData).nodePack = nodePack;
// Fallback to 1.0.0 if not specified - this matches the behavior of the backend
node.data.version ||= '1.0.0';
}
});
// Bump version