mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
🐛 Fix bug with expressions in credentials
This commit is contained in:
@@ -136,7 +136,11 @@ export class CredentialsHelper extends ICredentialsHelper {
|
|||||||
|
|
||||||
if (expressionResolveValues) {
|
if (expressionResolveValues) {
|
||||||
try {
|
try {
|
||||||
decryptedData = expressionResolveValues.workflow.expression.getParameterValue(decryptedData as INodeParameters, expressionResolveValues.runExecutionData, expressionResolveValues.runIndex, expressionResolveValues.itemIndex, expressionResolveValues.node.name, expressionResolveValues.connectionInputData) as ICredentialDataDecryptedObject;
|
const workflow = new Workflow({ nodes: Object.values(expressionResolveValues.workflow.nodes), connections: expressionResolveValues.workflow.connectionsBySourceNode, active: false, nodeTypes: expressionResolveValues.workflow.nodeTypes });
|
||||||
|
// TODO: Find a better way for that!
|
||||||
|
// Add the credential data to the parameters of the node so that they can get accessed by expressions
|
||||||
|
Object.assign(workflow.nodes[expressionResolveValues.node.name].parameters, decryptedData);
|
||||||
|
decryptedData = workflow.expression.getParameterValue(decryptedData as INodeParameters, expressionResolveValues.runExecutionData, expressionResolveValues.runIndex, expressionResolveValues.itemIndex, expressionResolveValues.node.name, expressionResolveValues.connectionInputData) as ICredentialDataDecryptedObject;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
e.message += ' [Error resolving credentials]';
|
e.message += ' [Error resolving credentials]';
|
||||||
throw e;
|
throw e;
|
||||||
|
|||||||
Reference in New Issue
Block a user