From 9cb474ea9c6f1c01b8e5c1212bdce453e6fe46f6 Mon Sep 17 00:00:00 2001 From: Hiroyasu Nishiyama Date: Mon, 7 Nov 2022 09:40:36 +0900 Subject: [PATCH] fix deployment of locked flow --- .../@node-red/editor-client/src/js/ui/deploy.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js b/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js index 8a8df6837..32b604235 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js +++ b/packages/node_modules/@node-red/editor-client/src/js/ui/deploy.js @@ -558,6 +558,11 @@ RED.deploy = (function() { RED.notify('

' + RED._("deploy.successfulDeploy") + '

', "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;