mirror of https://github.com/node-red/node-red.git
Merge pull request #3944 from node-red-hitachi/fix-deploy-locked-flow
fix deployment of locked flowpull/3968/head
commit
6bd67ae68c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue