Merge branch 'master' into dev

This commit is contained in:
Nick O'Leary
2021-06-08 11:44:31 +01:00
9 changed files with 197 additions and 14 deletions

View File

@@ -369,12 +369,12 @@ class Flow {
return undefined;
}
// console.log((new Error().stack).toString().split("\n").slice(1,3).join("\n"))
if ((this.flow.configs && this.flow.configs[id]) || (this.flow.nodes && this.flow.nodes[id])) {
if ((this.flow.configs && this.flow.configs[id]) || (this.flow.nodes && this.flow.nodes[id] && this.flow.nodes[id].type.substring(0,8) != "subflow:")) {
// This is a node owned by this flow, so return whatever we have got
// During a stop/restart, activeNodes could be null for this id
return this.activeNodes[id];
} else if (this.activeNodes[id]) {
// TEMP: this is a subflow internal node within this flow
// TEMP: this is a subflow internal node within this flow or subflow instance node
return this.activeNodes[id];
} else if (this.subflowInstanceNodes[id]) {
return this.subflowInstanceNodes[id];

View File

@@ -697,7 +697,9 @@ async function updateFlow(id,newFlow, user) {
nodes = [tabNode].concat(newFlow.nodes||[]).concat(newFlow.configs||[]);
nodes.forEach(function(n) {
n.z = id;
if (n.type !== 'tab') {
n.z = id;
}
});
}