From 486d16bcdb6be12dd85f4af5f7de878d9d178fd6 Mon Sep 17 00:00:00 2001 From: Omar Ajoue Date: Tue, 18 Jul 2023 11:58:53 +0200 Subject: [PATCH] fix: Stop n8n from complaining about credentials when saving a new workflow form a template (#6671) --- packages/editor-ui/src/views/NodeView.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/editor-ui/src/views/NodeView.vue b/packages/editor-ui/src/views/NodeView.vue index b5c637fc1a..83dfc33c86 100644 --- a/packages/editor-ui/src/views/NodeView.vue +++ b/packages/editor-ui/src/views/NodeView.vue @@ -866,6 +866,12 @@ export default defineComponent({ data.workflow.nodes = NodeViewUtils.getFixedNodesList(data.workflow.nodes) as INodeUi[]; + data.workflow.nodes?.forEach((node) => { + if (node.credentials) { + delete node.credentials; + } + }); + this.blankRedirect = true; void this.$router.replace({ name: VIEWS.NEW_WORKFLOW, query: { templateId } });