mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 20:00:02 +00:00
fix(editor): Fix workflow activation from the Workflows view (#4549)
🐛 Fixing a bug when activating workflow from workflows view
This commit is contained in:
committed by
GitHub
parent
026fb50512
commit
d2bec63cec
@@ -94,7 +94,7 @@ export default mixins(
|
||||
},
|
||||
methods: {
|
||||
async activeChanged (newActiveState: boolean) {
|
||||
return this.updateWorkflowActivation(this.workflowId, newActiveState);
|
||||
return await this.updateWorkflowActivation(this.workflowId, newActiveState);
|
||||
},
|
||||
async displayActivationError () {
|
||||
let errorMessage: string;
|
||||
|
||||
@@ -100,6 +100,7 @@ export default mixins(
|
||||
name: '',
|
||||
sharedWith: [],
|
||||
ownedBy: {} as IUser,
|
||||
hash: '',
|
||||
}),
|
||||
},
|
||||
readonly: {
|
||||
|
||||
@@ -611,7 +611,7 @@ export default mixins(
|
||||
|
||||
try {
|
||||
const workflow = await this.restApi().updateWorkflow(this.$route.params.name, data);
|
||||
this.workflowsStore.setWorkflowHash(workflow.hash || '');
|
||||
this.workflowsStore.setWorkflowHash(workflow.hash);
|
||||
} catch (error) {
|
||||
this.$showError(
|
||||
error,
|
||||
|
||||
@@ -681,7 +681,7 @@ export const workflowHelpers = mixins(
|
||||
data = await this.getWorkflowDataToSave();
|
||||
} else {
|
||||
const { hash } = await this.restApi().getWorkflow(workflowId);
|
||||
data.hash = hash as string;
|
||||
data.hash = hash;
|
||||
}
|
||||
|
||||
if (active !== undefined) {
|
||||
@@ -689,7 +689,7 @@ export const workflowHelpers = mixins(
|
||||
}
|
||||
|
||||
const workflow = await this.restApi().updateWorkflow(workflowId, data);
|
||||
this.workflowsStore.setWorkflowHash(workflow.hash || '');
|
||||
this.workflowsStore.setWorkflowHash(workflow.hash);
|
||||
|
||||
if (isCurrentWorkflow) {
|
||||
this.workflowsStore.setActive(!!workflow.active);
|
||||
@@ -727,7 +727,7 @@ export const workflowHelpers = mixins(
|
||||
workflowDataRequest.hash = this.workflowsStore.workflowHash;
|
||||
|
||||
const workflowData = await this.restApi().updateWorkflow(currentWorkflow, workflowDataRequest);
|
||||
this.workflowsStore.setWorkflowHash(workflowData.hash || '');
|
||||
this.workflowsStore.setWorkflowHash(workflowData.hash);
|
||||
|
||||
if (name) {
|
||||
this.workflowsStore.setWorkflowName({newName: workflowData.name, setStateDirty: false});
|
||||
@@ -794,7 +794,7 @@ export const workflowHelpers = mixins(
|
||||
const workflowData = await this.restApi().createNewWorkflow(workflowDataRequest);
|
||||
|
||||
this.workflowsStore.addWorkflow(workflowData);
|
||||
this.workflowsStore.setWorkflowHash(workflowData.hash || '');
|
||||
this.workflowsStore.setWorkflowHash(workflowData.hash);
|
||||
|
||||
if (openInNewWindow) {
|
||||
const routeData = this.$router.resolve({name: VIEWS.WORKFLOW, params: {name: workflowData.id}});
|
||||
|
||||
Reference in New Issue
Block a user