From 70dc3f3333a54bce8f43f691a7a5d0108df6a004 Mon Sep 17 00:00:00 2001 From: freyamade Date: Wed, 25 Jan 2023 12:23:14 +0000 Subject: [PATCH] :bug: - fixed post duplication save issue --- packages/editor-ui/src/mixins/workflowHelpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor-ui/src/mixins/workflowHelpers.ts b/packages/editor-ui/src/mixins/workflowHelpers.ts index bead0d1cf47ab..46a4a9656699d 100644 --- a/packages/editor-ui/src/mixins/workflowHelpers.ts +++ b/packages/editor-ui/src/mixins/workflowHelpers.ts @@ -929,7 +929,6 @@ export const workflowHelpers = mixins(externalHooks, nodeHelpers, restApi, showM const workflowData = await this.restApi().createNewWorkflow(workflowDataRequest); this.workflowsStore.addWorkflow(workflowData); - this.workflowsStore.setWorkflowVersionId(workflowData.versionId); if ( this.settingsStore.isEnterpriseFeatureEnabled(EnterpriseEditionFeature.Sharing) && @@ -953,6 +952,7 @@ export const workflowHelpers = mixins(externalHooks, nodeHelpers, restApi, showM this.workflowsStore.setActive(workflowData.active || false); this.workflowsStore.setWorkflowId(workflowData.id); + this.workflowsStore.setWorkflowVersionId(workflowData.versionId); this.workflowsStore.setWorkflowName({ newName: workflowData.name, setStateDirty: false }); this.workflowsStore.setWorkflowSettings((workflowData.settings as IWorkflowSettings) || {}); this.uiStore.stateIsDirty = false;