1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

fix deployment of locked flow

This commit is contained in:
Hiroyasu Nishiyama 2022-11-07 09:40:36 +09:00
parent fe9c630572
commit 9cb474ea9c

View File

@ -558,6 +558,11 @@ RED.deploy = (function() {
RED.notify('<p>' + RED._("deploy.successfulDeploy") + '</p>', "success");
}
RED.nodes.eachNode(function (node) {
const flow = node.z && (RED.nodes.workspace(node.z) || RED.nodes.subflow(node.z) || null);
const isLocked = flow ? flow.locked : false;
if (flow && isLocked) {
flow.locked = false;
}
if (node.changed) {
node.dirty = true;
node.changed = false;
@ -569,6 +574,9 @@ RED.deploy = (function() {
if (node.credentials) {
delete node.credentials;
}
if (flow && isLocked) {
flow.locked = isLocked;
}
});
RED.nodes.eachConfig(function (confNode) {
confNode.changed = false;