Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复任务未执行节点预览时免渲染表单项中变量仍被渲染问题 #7358 #7383

Open
wants to merge 5 commits into
base: release_humming_bird
Choose a base branch
from

Conversation

lTimej
Copy link
Collaborator

@lTimej lTimej commented Mar 12, 2024

No description provided.

@@ -169,7 +169,8 @@ def get_need_render_context_keys():
else:
raise Exception(f"can not preview inputs for node type: {node_type}")
raw_inputs = {key: info["value"] for key, info in raw_inputs.items()}
hydrated_context = context.hydrate(deformat=True)
need_render = pipeline["activities"][node_id]["component"]["inputs"]["job_content"]["need_render"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个处理方式不通用,job_content不是每个 input 都有的,会出现 keyerror

{
"${%s}" % key
for key, val in pipeline["activities"].get(node_id, {}).get("component", {}).get("inputs", {}).items()
if not val.get("need_render")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

val.get("need_render") is False,默认渲染,避免历史数据没有need_render字段的情况

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

任务未执行节点预览时免渲染表单项中变量仍被渲染
2 participants