Skip to content

Commit

Permalink
fix: 修复任务未执行节点预览时免渲染表单项中变量仍被渲染问题 #7358
Browse files Browse the repository at this point in the history
  • Loading branch information
lTimej committed Mar 12, 2024
1 parent 5eab49d commit a0a36db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repos:
hooks:
- id: check-merge-conflict
- repo: https://github.com/psf/black
rev: stable
rev: 22.8.0
hooks:
- id: black
language_version: python3.6
Expand Down
3 changes: 2 additions & 1 deletion gcloud/tasktmpl3/domains/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
hydrated_context = context.hydrate(deformat=need_render)
inputs = Template(raw_inputs).render(hydrated_context)
return inputs

Expand Down

0 comments on commit a0a36db

Please sign in to comment.