fix(core): Fix workflow activation with history and workflow history for EE (no-changelog) (#7508)

Github issue / Community forum post (link here to close automatically):
This commit is contained in:
Val
2023-10-25 11:07:11 +01:00
committed by GitHub
parent 671c95760b
commit 93cfabbeac
8 changed files with 361 additions and 34 deletions

View File

@@ -447,7 +447,7 @@ export async function createManyWorkflows(
* @param user user to assign the workflow to
*/
export async function createWorkflow(attributes: Partial<WorkflowEntity> = {}, user?: User) {
const { active, name, nodes, connections } = attributes;
const { active, name, nodes, connections, versionId } = attributes;
const workflowEntity = Db.collections.Workflow.create({
active: active ?? false,
@@ -463,6 +463,7 @@ export async function createWorkflow(attributes: Partial<WorkflowEntity> = {}, u
},
],
connections: connections ?? {},
versionId: versionId ?? uuid(),
...attributes,
});