Fix credential lookup for nested subflows

Fixes #2910
This commit is contained in:
Nick O'Leary 2021-03-25 22:27:49 +00:00
parent 082bac8c3a
commit f8a7835341
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 5 additions and 1 deletions

View File

@ -112,8 +112,12 @@ class Subflow extends Flow {
this.node_map = node_map;
this.path = parent.path+"/"+(subflowInstance._alias||subflowInstance.id);
let id = subflowInstance.id;
if (subflowInstance._alias) {
id = subflowInstance._alias;
}
this.templateCredentials = credentials.get(subflowDef.id) || {};
this.instanceCredentials = credentials.get(this.id) || {};
this.instanceCredentials = credentials.get(id) || {};
var env = [];
if (this.subflowDef.env) {