fix(workflow): both parallel and single branch errors occur in if-else (#8378)

This commit is contained in:
takatost 2024-09-13 19:55:54 +08:00 committed by GitHub
parent 9d80d7def7
commit cd3eaed335
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -405,21 +405,22 @@ class Graph(BaseModel):
if condition_edge_mappings: if condition_edge_mappings:
for condition_hash, graph_edges in condition_edge_mappings.items(): for condition_hash, graph_edges in condition_edge_mappings.items():
current_parallel = cls._get_current_parallel( for graph_edge in graph_edges:
parallel_mapping=parallel_mapping, current_parallel: GraphParallel | None = cls._get_current_parallel(
graph_edge=graph_edge, parallel_mapping=parallel_mapping,
parallel=condition_parallels.get(condition_hash), graph_edge=graph_edge,
parent_parallel=parent_parallel, parallel=condition_parallels.get(condition_hash),
) parent_parallel=parent_parallel,
)
cls._recursively_add_parallels( cls._recursively_add_parallels(
edge_mapping=edge_mapping, edge_mapping=edge_mapping,
reverse_edge_mapping=reverse_edge_mapping, reverse_edge_mapping=reverse_edge_mapping,
start_node_id=graph_edge.target_node_id, start_node_id=graph_edge.target_node_id,
parallel_mapping=parallel_mapping, parallel_mapping=parallel_mapping,
node_parallel_mapping=node_parallel_mapping, node_parallel_mapping=node_parallel_mapping,
parent_parallel=current_parallel, parent_parallel=current_parallel,
) )
else: else:
for graph_edge in target_node_edges: for graph_edge in target_node_edges:
current_parallel = cls._get_current_parallel( current_parallel = cls._get_current_parallel(