revert saving changes

This commit is contained in:
Mutasem 2022-01-18 13:08:14 +01:00
parent a720356ce8
commit 25c29d1055

View file

@ -437,7 +437,7 @@ export const workflowHelpers = mixins(
return returnData['__xxxxxxx__'];
},
async saveCurrentWorkflow({name, tags, active}: {name?: string, tags?: string[], active?: boolean} = {}): Promise<boolean> {
async saveCurrentWorkflow({name, tags}: {name?: string, tags?: string[]} = {}): Promise<boolean> {
const currentWorkflow = this.$route.params.name;
if (!currentWorkflow) {
return this.saveAsNewWorkflow({name, tags});
@ -457,10 +457,6 @@ export const workflowHelpers = mixins(
workflowDataRequest.tags = tags;
}
if (active !== undefined) {
workflowDataRequest.active = active;
}
const workflowData = await this.restApi().updateWorkflow(currentWorkflow, workflowDataRequest);
if (name) {
@ -473,14 +469,6 @@ export const workflowHelpers = mixins(
this.$store.commit('setWorkflowTagIds', tagIds);
}
this.$store.commit('setActive', workflowData.active);
if (workflowData.active === true) {
this.$store.commit('setWorkflowActive', workflowData.id);
} else {
this.$store.commit('setWorkflowInactive', workflowData.id);
}
this.$store.commit('setStateDirty', false);
this.$store.commit('removeActiveAction', 'workflowSaving');
this.$externalHooks().run('workflow.afterUpdate', { workflowData });