🐛 fix(base.py): fix validation logic in _validate_nodes method to handle case when there is only one node in the graph
This commit is contained in:
parent
7b22e0780f
commit
a0748e1093
1 changed files with 2 additions and 0 deletions
|
|
@ -77,6 +77,8 @@ class Graph:
|
|||
|
||||
def _validate_nodes(self) -> None:
|
||||
"""Check that all nodes have edges"""
|
||||
if len(self.nodes) == 1:
|
||||
return
|
||||
for node in self.nodes:
|
||||
if not self._validate_node(node):
|
||||
raise ValueError(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue