fix: Fixes an issue when saving an active workflow without triggers would cause n8n to be stuck (#5513)
fix: Allow saving and editing when an active workflow is saved without triggers
This commit is contained in:
@@ -332,7 +332,11 @@ export class WorkflowsService {
|
|||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// If workflow could not be activated set it again to inactive
|
// If workflow could not be activated set it again to inactive
|
||||||
await Db.collections.Workflow.update(workflowId, { active: false });
|
// and revert the versionId change so UI remains consistent
|
||||||
|
await Db.collections.Workflow.update(workflowId, {
|
||||||
|
active: false,
|
||||||
|
versionId: shared.workflow.versionId,
|
||||||
|
});
|
||||||
|
|
||||||
// Also set it in the returned data
|
// Also set it in the returned data
|
||||||
updatedWorkflow.active = false;
|
updatedWorkflow.active = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user