mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(editor): Fix problem with HTTP Request Node 1 credentials to be set (#3371)
This commit is contained in:
parent
e5d9a7b20f
commit
c5fc3bc45e
|
@ -330,23 +330,24 @@ export const workflowHelpers = mixins(
|
||||||
if (node.credentials !== undefined && nodeType.credentials !== undefined) {
|
if (node.credentials !== undefined && nodeType.credentials !== undefined) {
|
||||||
const saveCredenetials: INodeCredentials = {};
|
const saveCredenetials: INodeCredentials = {};
|
||||||
for (const nodeCredentialTypeName of Object.keys(node.credentials)) {
|
for (const nodeCredentialTypeName of Object.keys(node.credentials)) {
|
||||||
if (this.hasProxyAuth(node) || Object.keys(node.parameters).includes('genericAuthType')) {
|
// todo revert to only set actually used credentials on workflow
|
||||||
saveCredenetials[nodeCredentialTypeName] = node.credentials[nodeCredentialTypeName];
|
// if (this.hasProxyAuth(node) || Object.keys(node.parameters).includes('genericAuthType')) {
|
||||||
continue;
|
// saveCredenetials[nodeCredentialTypeName] = node.credentials[nodeCredentialTypeName];
|
||||||
}
|
// continue;
|
||||||
|
// }
|
||||||
|
|
||||||
const credentialTypeDescription = nodeType.credentials
|
// const credentialTypeDescription = nodeType.credentials
|
||||||
.find((credentialTypeDescription) => credentialTypeDescription.name === nodeCredentialTypeName);
|
// .find((credentialTypeDescription) => credentialTypeDescription.name === nodeCredentialTypeName);
|
||||||
|
|
||||||
if (credentialTypeDescription === undefined) {
|
// if (credentialTypeDescription === undefined) {
|
||||||
// Credential type is not know so do not save
|
// // Credential type is not know so do not save
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (this.displayParameter(node.parameters, credentialTypeDescription, '', node) === false) {
|
// if (this.displayParameter(node.parameters, credentialTypeDescription, '', node) === false) {
|
||||||
// Credential should not be displayed so do also not save
|
// // Credential should not be displayed so do also not save
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
|
|
||||||
saveCredenetials[nodeCredentialTypeName] = node.credentials[nodeCredentialTypeName];
|
saveCredenetials[nodeCredentialTypeName] = node.credentials[nodeCredentialTypeName];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue