fix: Stop n8n from complaining about credentials when saving a new workflow form a template (#6671)

This commit is contained in:
Omar Ajoue 2023-07-18 11:58:53 +02:00 committed by GitHub
parent 2af1c24ead
commit 486d16bcdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 } });