From 3c1cacbf9aa3d6ab7dcd6fe88558b88ba16f4463 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Mon, 22 Jul 2024 13:04:50 -0300 Subject: [PATCH] fix: change logical operator in Graph class improving API usage (#2838) refactor: fix logical operator in Graph class Fixes a logical operator in the Graph class that was causing incorrect filtering of vertices based on input components. The operator was changed from "or" to "and" to ensure that both conditions are met before skipping the vertex. This resolves an issue where certain vertices were being skipped incorrectly. Co-authored-by: Cristhian Zanforlin Lousa <72977554+Cristhianzl@users.noreply.github.com> --- src/backend/base/langflow/graph/graph/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/base/langflow/graph/graph/base.py b/src/backend/base/langflow/graph/graph/base.py index 3baeac8ae..043088392 100644 --- a/src/backend/base/langflow/graph/graph/base.py +++ b/src/backend/base/langflow/graph/graph/base.py @@ -323,7 +323,7 @@ class Graph: vertex = self.get_vertex(vertex_id) # If the vertex is not in the input_components list if input_components and ( - vertex_id not in input_components or vertex.display_name not in input_components + vertex_id not in input_components and vertex.display_name not in input_components ): continue # If the input_type is not any and the input_type is not in the vertex id