feat(editor): Handle pin data edge cases and unify validation (no-changelog) (#6685)

Github issue / Community forum post (link here to close automatically):
This commit is contained in:
Alex Grozav
2023-11-02 10:43:02 +02:00
committed by GitHub
parent 27f37091c8
commit 721a36637c
15 changed files with 238 additions and 142 deletions

View File

@@ -34,7 +34,6 @@ import type { INodeUi } from '@/Interface';
import type { INodeTypeDescription } from 'n8n-workflow';
import { workflowRun } from '@/mixins/workflowRun';
import { pinData } from '@/mixins/pinData';
import { dataPinningEventBus } from '@/event-bus';
import { useWorkflowsStore } from '@/stores/workflows.store';
import { useNDVStore } from '@/stores/ndv.store';
import { useNodeTypesStore } from '@/stores/nodeTypes.store';
@@ -228,9 +227,8 @@ export default defineComponent({
);
shouldUnpinAndExecute = confirmResult === MODAL_CONFIRM;
if (shouldUnpinAndExecute) {
dataPinningEventBus.emit('data-unpinning', { source: 'unpin-and-execute-modal' });
this.workflowsStore.unpinData({ node: this.node });
if (shouldUnpinAndExecute && this.node) {
this.unsetPinData(this.node, 'unpin-and-execute-modal');
}
}