mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-16 06:05:58 +08:00
fix: iteration start node id
This commit is contained in:
parent
9c8144e463
commit
b9f34f679f
@ -64,7 +64,7 @@ class IterationNode(BaseNode):
|
|||||||
):
|
):
|
||||||
start_node_ids.append(node_config.get('id'))
|
start_node_ids.append(node_config.get('id'))
|
||||||
|
|
||||||
if len(start_node_ids) > 1:
|
if len(start_node_ids) > 0:
|
||||||
# add new fake iteration start node that connect to all start nodes
|
# add new fake iteration start node that connect to all start nodes
|
||||||
root_node_id = f"{self.node_id}-start"
|
root_node_id = f"{self.node_id}-start"
|
||||||
graph_config['nodes'].append({
|
graph_config['nodes'].append({
|
||||||
@ -81,6 +81,9 @@ class IterationNode(BaseNode):
|
|||||||
"target": start_node_id
|
"target": start_node_id
|
||||||
})
|
})
|
||||||
else:
|
else:
|
||||||
|
if not self.node_data.start_node_id:
|
||||||
|
raise ValueError(f'field start_node_id in iteration {self.node_id} not found')
|
||||||
|
|
||||||
root_node_id = self.node_data.start_node_id
|
root_node_id = self.node_data.start_node_id
|
||||||
|
|
||||||
# init graph
|
# init graph
|
||||||
|
Loading…
x
Reference in New Issue
Block a user