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