mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
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:
parent
db702932f3
commit
75a094a8c0
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue