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: 修复create_task api execute_task_nodes_id 传参时有两次replace_id操作导致报错问题… #7445

Open
wants to merge 1 commit into
base: release_3.32.2_by_master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions gcloud/template_base/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,15 @@ def replace_template_id(template_model, pipeline_data, reverse=False):
apps.get_model("template", "CommonTemplate") if act.get("template_source") == COMMON else template_model
)
if not reverse:
act["template_id"] = subprocess_template_model.objects.get(
pk=act["template_id"]
).pipeline_template.template_id
template = subprocess_template_model.objects.filter(pk=act["template_id"]).first()
if template:
act["template_id"] = template.pipeline_template.template_id
else:
template = subprocess_template_model.objects.get(pipeline_template__template_id=act["template_id"])
act["template_id"] = str(template.pk)
template = subprocess_template_model.objects.filter(
pipeline_template__template_id=act["template_id"]
).first()
if template:
act["template_id"] = str(template.pk)


def inject_template_node_id(pipeline_tree: dict):
Expand Down
Loading