From 4eec44e9a817d8b362d1b8879a7a7a278925ece9 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 20 Jun 2024 18:48:53 -0300 Subject: [PATCH] refactor: Fix conditional check in Graph.mark_branch method --- src/backend/base/langflow/graph/graph/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/base/langflow/graph/graph/base.py b/src/backend/base/langflow/graph/graph/base.py index be71519f0..7b054dbbf 100644 --- a/src/backend/base/langflow/graph/graph/base.py +++ b/src/backend/base/langflow/graph/graph/base.py @@ -4,6 +4,7 @@ from collections import defaultdict, deque from functools import partial from itertools import chain from typing import TYPE_CHECKING, Dict, Generator, List, Optional, Tuple, Type, Union + from loguru import logger from langflow.exceptions.component import ComponentBuildException @@ -489,7 +490,7 @@ class Graph: # should be marked if output_name: edge = self.get_edge(vertex_id, child_id) - if edge.source_handle.name != output_name: + if edge and edge.source_handle.name != output_name: continue self.mark_branch(child_id, state)