fix: make draft input bind idempotent

This commit is contained in:
lda
2026-06-29 19:35:53 +07:00 Verified
parent 89c405ed27
commit ca299e6fa0
+9 -6
View File
@@ -234,12 +234,15 @@ class WorkflowDraftAuthoringApi:
target_schema = workspace.draft.get(schema_key, {})
if not isinstance(target_schema, dict):
raise ValueError(f"draft {schema_key} must be an object")
projected = project_property_to_schema_path(
target_schema=target_schema,
source_schema=input_schema,
source_field=local_field,
target_parts=source_parts,
)
if _schema_path_exists(target_schema, source_parts):
projected = target_schema
else:
projected = project_property_to_schema_path(
target_schema=target_schema,
source_schema=input_schema,
source_field=local_field,
target_parts=source_parts,
)
input_map = {
**_input_map_from_payload(step.get("input", [])),
source_path: local_field,