mirror of
https://github.com/langgenius/dify.git
synced 2026-02-09 23:20:12 -05:00
[autofix.ci] apply automated fixes
This commit is contained in:
@@ -309,9 +309,7 @@ class GraphBuilder:
|
|||||||
# Check for cycles
|
# Check for cycles
|
||||||
if len(sorted_ids) != len(node_ids):
|
if len(sorted_ids) != len(node_ids):
|
||||||
remaining = node_ids - set(sorted_ids)
|
remaining = node_ids - set(sorted_ids)
|
||||||
raise CyclicDependencyError(
|
raise CyclicDependencyError(f"Cyclic dependency detected involving nodes: {remaining}")
|
||||||
f"Cyclic dependency detected involving nodes: {remaining}"
|
|
||||||
)
|
|
||||||
|
|
||||||
return sorted_ids
|
return sorted_ids
|
||||||
|
|
||||||
@@ -530,11 +528,7 @@ class GraphBuilder:
|
|||||||
|
|
||||||
# If no terminal nodes found (shouldn't happen), use all non-branching nodes
|
# If no terminal nodes found (shouldn't happen), use all non-branching nodes
|
||||||
if not terminal_nodes:
|
if not terminal_nodes:
|
||||||
terminal_nodes = [
|
terminal_nodes = [node["id"] for node in nodes if node.get("type") not in BRANCHING_NODE_TYPES]
|
||||||
node["id"]
|
|
||||||
for node in nodes
|
|
||||||
if node.get("type") not in BRANCHING_NODE_TYPES
|
|
||||||
]
|
|
||||||
logger.warning("No terminal nodes found, using all non-branching nodes")
|
logger.warning("No terminal nodes found, using all non-branching nodes")
|
||||||
|
|
||||||
return terminal_nodes
|
return terminal_nodes
|
||||||
|
|||||||
Reference in New Issue
Block a user