Skip to content

Commit

Permalink
fix: Improve logic to consider target handle name in ComponentVertex.
Browse files Browse the repository at this point in the history
Fixes #3380
  • Loading branch information
ogabrielluiz committed Aug 16, 2024
1 parent 9499e7e commit 0b2a07e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/backend/base/langflow/graph/vertex/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ async def _get_result(self, requester: "Vertex", target_handle_name: str | None
edges = self.get_edge_with_target(requester.id)
result = UNDEFINED
for edge in edges:
if edge is not None and edge.source_handle.name in self.results:
if (
edge is not None
and edge.source_handle.name in self.results
and edge.target_handle.field_name == target_handle_name
):
# Get the result from the output instead of the results dict
try:
output = self.get_output(edge.source_handle.name)
Expand Down

0 comments on commit 0b2a07e

Please sign in to comment.