Skip to content

Commit

Permalink
fix: change logical operator in Graph class improving API usage (lang…
Browse files Browse the repository at this point in the history
…flow-ai#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>
  • Loading branch information
anovazzi1 and Cristhianzl committed Jul 22, 2024
1 parent 4b9dc47 commit 3c1cacb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/base/langflow/graph/graph/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ async def _run(
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
Expand Down

0 comments on commit 3c1cacb

Please sign in to comment.