fix(core): revert blocking workflow update on interim change (#4437)

 Revert "feat(core): block workflow update on interim change (#4397)"

This reverts commit cddd012a2f.
This commit is contained in:
Iván Ovejero
2022-10-25 13:45:47 +02:00
committed by GitHub
parent b296fb06f3
commit 07adc2d2dc
11 changed files with 10 additions and 208 deletions

View File

@@ -10,15 +10,7 @@
</template>
<div :class="$style.cardDescription">
<n8n-text color="text-light" size="small">
<span v-show="data">
<span v-if="data.updatedAt === -1">
{{ $locale.baseText('workflows.item.neverUpdated') }} |
</span>
<span v-else>
{{ $locale.baseText('workflows.item.updated') }}
<time-ago :date="data.updatedAt" /> |
</span>
</span>
<span v-show="data">{{$locale.baseText('workflows.item.updated')}} <time-ago :date="data.updatedAt" /> | </span>
<span v-show="data" class="mr-2xs">{{$locale.baseText('workflows.item.created')}} {{ formattedCreatedAtDate }} </span>
<span v-if="areTagsEnabled && data.tags && data.tags.length > 0" v-show="data">
<n8n-tags

View File

@@ -519,8 +519,7 @@ export default mixins(
this.isLoading = true;
try {
const workflow = await this.restApi().updateWorkflow(this.$route.params.name, data);
this.$store.commit('setWorkflowUpdatedAt', workflow.updatedAt);
await this.restApi().updateWorkflow(this.$route.params.name, data);
} catch (error) {
this.$showError(
error,

View File

@@ -400,7 +400,6 @@ export const workflowHelpers = mixins(
active: this.$store.getters.isActive,
settings: this.$store.getters.workflowSettings,
tags: this.$store.getters.workflowTags,
updatedAt: this.$store.getters.workflowUpdatedAt,
};
const workflowId = this.$store.getters.workflowId;
@@ -661,9 +660,6 @@ export const workflowHelpers = mixins(
const isCurrentWorkflow = workflowId === this.$store.getters.workflowId;
if (isCurrentWorkflow) {
data = await this.getWorkflowDataToSave();
} else {
const { updatedAt } = await this.restApi().getWorkflow(workflowId);
data.updatedAt = updatedAt as string;
}
if (active !== undefined) {
@@ -671,7 +667,6 @@ export const workflowHelpers = mixins(
}
const workflow = await this.restApi().updateWorkflow(workflowId, data);
this.$store.commit('setWorkflowUpdatedAt', workflow.updatedAt);
if (isCurrentWorkflow) {
this.$store.commit('setActive', !!workflow.active);
@@ -719,7 +714,6 @@ export const workflowHelpers = mixins(
this.$store.commit('setStateDirty', false);
this.$store.commit('removeActiveAction', 'workflowSaving');
this.$store.commit('setWorkflowUpdatedAt', workflowData.updatedAt);
this.$externalHooks().run('workflow.afterUpdate', { workflowData });
return true;