From 94a00c0c5ecb3ddb3b406f7c57cf1541d1e980bc Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Fri, 1 Mar 2024 23:56:35 -0300 Subject: [PATCH] Refactor build_vertex function to reset both inactivated and activated vertices --- src/backend/langflow/api/v1/chat.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/backend/langflow/api/v1/chat.py b/src/backend/langflow/api/v1/chat.py index 7126c19e3..399098d47 100644 --- a/src/backend/langflow/api/v1/chat.py +++ b/src/backend/langflow/api/v1/chat.py @@ -154,13 +154,15 @@ async def build_vertex( result_data_response.timedelta = timedelta vertex.add_build_time(timedelta) inactivated_vertices = None - if graph.inactivated_vertices: - inactivated_vertices = list(graph.inactivated_vertices) - graph.reset_inactivated_vertices() + inactivated_vertices = list(graph.inactivated_vertices) + graph.reset_inactivated_vertices() + activated_vertices = list(graph.activated_vertices) + graph.reset_activated_vertices() chat_service.set_cache(flow_id, graph) build_response = VertexBuildResponse( inactivated_vertices=inactivated_vertices, + activated_vertices=activated_vertices, valid=valid, params=params, id=vertex.id,