From b26797c0fd885a02dd682460d8cfea95d7c21706 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 22 Feb 2024 23:34:45 -0300 Subject: [PATCH] Conditionally return inactive_vertices --- src/backend/langflow/api/v1/chat.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/backend/langflow/api/v1/chat.py b/src/backend/langflow/api/v1/chat.py index c5090b3e1..ef4c01c2e 100644 --- a/src/backend/langflow/api/v1/chat.py +++ b/src/backend/langflow/api/v1/chat.py @@ -187,8 +187,13 @@ async def build_vertex( result_dict.duration = duration result_dict.timedelta = timedelta vertex.add_build_time(timedelta) + inactive_vertices = None + if graph.inactive_vertices: + inactive_vertices = list(graph.inactive_vertices) + graph.reset_inactive_vertices() return VertexBuildResponse( + inactive_vertices=inactive_vertices, valid=valid, params=params, id=vertex.id,