mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
🐛 Fix cred ref lost and unsaved
This commit is contained in:
parent
d074e524fc
commit
403e5708a6
|
@ -326,10 +326,17 @@ export const workflowHelpers = mixins(
|
||||||
const nodeParameters = NodeHelpers.getNodeParameters(nodeType.properties, node.parameters, false, false, node);
|
const nodeParameters = NodeHelpers.getNodeParameters(nodeType.properties, node.parameters, false, false, node);
|
||||||
nodeData.parameters = nodeParameters !== null ? nodeParameters : {};
|
nodeData.parameters = nodeParameters !== null ? nodeParameters : {};
|
||||||
|
|
||||||
|
const fullAccess = ['n8n-nodes-base.httpRequest'].includes(node.type);
|
||||||
|
|
||||||
// Add the node credentials if there are some set and if they should be displayed
|
// Add the node credentials if there are some set and if they should be displayed
|
||||||
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 (fullAccess) {
|
||||||
|
saveCredenetials[nodeCredentialTypeName] = node.credentials[nodeCredentialTypeName];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
const credentialTypeDescription = nodeType.credentials
|
const credentialTypeDescription = nodeType.credentials
|
||||||
.find((credentialTypeDescription) => credentialTypeDescription.name === nodeCredentialTypeName);
|
.find((credentialTypeDescription) => credentialTypeDescription.name === nodeCredentialTypeName);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue