mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(core): Deactivate active workflows during import (#5840)
* deactivate imported workflows * improve test * fix for combined import (and test) * cleanup
This commit is contained in:
committed by
GitHub
parent
e4796c169b
commit
fa5bc814b0
@@ -131,6 +131,13 @@ export class ImportWorkflowsCommand extends BaseCommand {
|
||||
await setTagsForImport(transactionManager, workflow, tags);
|
||||
}
|
||||
|
||||
if (workflow.active) {
|
||||
this.logger.info(
|
||||
`Deactivating workflow "${workflow.name}" during import, remember to activate it later.`,
|
||||
);
|
||||
workflow.active = false;
|
||||
}
|
||||
|
||||
await this.storeWorkflow(workflow, user);
|
||||
}
|
||||
});
|
||||
@@ -174,6 +181,12 @@ export class ImportWorkflowsCommand extends BaseCommand {
|
||||
if (Object.prototype.hasOwnProperty.call(workflow, 'tags')) {
|
||||
await setTagsForImport(transactionManager, workflow, tags);
|
||||
}
|
||||
if (workflow.active) {
|
||||
this.logger.info(
|
||||
`Deactivating workflow "${workflow.name}" during import, remember to activate it later.`,
|
||||
);
|
||||
workflow.active = false;
|
||||
}
|
||||
|
||||
await this.storeWorkflow(workflow, user);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user