From d8ce1bc9706eaf6bbb6376558abf9fa1fdd0f3f5 Mon Sep 17 00:00:00 2001 From: hanshuaikang <1758504262@qq.com> Date: Thu, 7 Sep 2023 10:46:45 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E4=BF=AE=E5=A4=8Dpreview=5Fnode=5Fin?= =?UTF-8?q?puts=E5=AF=B9=E4=BA=8E=E5=AD=90=E6=B5=81=E7=A8=8B=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gcloud/tasktmpl3/domains/constants.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcloud/tasktmpl3/domains/constants.py b/gcloud/tasktmpl3/domains/constants.py index 3913770074..5cb03038d9 100644 --- a/gcloud/tasktmpl3/domains/constants.py +++ b/gcloud/tasktmpl3/domains/constants.py @@ -95,8 +95,9 @@ def get_need_render_context_keys(): keys.add("${" + value + "}") return keys - node_type = pipeline["activities"][node_id]["type"] - node_code = pipeline["activities"][node_id].get("component", {}).get("code") + # 对于子流程内的节点,拿不到当前node_id的type和code + node_type = pipeline["activities"].get(node_id, {}).get("type") + node_code = pipeline["activities"].get(node_id, {}).get("component", {}).get("code") # 只优化普通节点的渲染过程 if node_type == NodeType.ServiceActivity.value and node_code != "subprocess_plugin": need_render_context_keys = get_need_render_context_keys()