mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Ignore state of disabled nodes/flows during deployment
This commit is contained in:
parent
ff565bacb4
commit
d9c5144fe2
@ -425,11 +425,15 @@ RED.deploy = (function() {
|
||||
const unknownNodes = [];
|
||||
const invalidNodes = [];
|
||||
|
||||
const isDisabled = function (node) {
|
||||
return (node.d || RED.nodes.workspace(node.z)?.disabled);
|
||||
};
|
||||
|
||||
RED.nodes.eachConfig(function (node) {
|
||||
if (node.valid === undefined) {
|
||||
RED.editor.validateNode(node);
|
||||
}
|
||||
if (!node.valid && !node.d) {
|
||||
if (!node.valid && !isDisabled(node)) {
|
||||
invalidNodes.push(getNodeInfo(node));
|
||||
}
|
||||
if (node.type === "unknown") {
|
||||
@ -439,7 +443,7 @@ RED.deploy = (function() {
|
||||
}
|
||||
});
|
||||
RED.nodes.eachNode(function (node) {
|
||||
if (!node.valid && !node.d) {
|
||||
if (!node.valid && !isDisabled(node)) {
|
||||
invalidNodes.push(getNodeInfo(node));
|
||||
}
|
||||
if (node.type === "unknown") {
|
||||
@ -453,7 +457,7 @@ RED.deploy = (function() {
|
||||
|
||||
const unusedConfigNodes = [];
|
||||
RED.nodes.eachConfig(function (node) {
|
||||
if ((node._def.hasUsers !== false) && (node.users.length === 0)) {
|
||||
if ((node._def.hasUsers !== false) && (node.users.length === 0) && !isDisabled(node)) {
|
||||
unusedConfigNodes.push(getNodeInfo(node));
|
||||
hasUnusedConfig = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user