From dc6e30d598850a5238669dad0c84c6d30dfffe3a Mon Sep 17 00:00:00 2001 From: italojohnny Date: Thu, 20 Jun 2024 21:37:12 -0300 Subject: [PATCH] fix return error reported by mypy --- src/backend/base/langflow/graph/graph/base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/backend/base/langflow/graph/graph/base.py b/src/backend/base/langflow/graph/graph/base.py index 7b054dbbf..7ddfcafae 100644 --- a/src/backend/base/langflow/graph/graph/base.py +++ b/src/backend/base/langflow/graph/graph/base.py @@ -762,8 +762,7 @@ class Graph: successors = self.get_all_successors(vertex, recursive=False) if not any(successor in vertices for successor in successors): return vertex - else: - raise ValueError(f"Vertex {vertex_id} is not a top level vertex") + raise ValueError(f"Vertex {vertex_id} is not a top level vertex or no root vertex found") async def build_vertex( self,