diff --git a/src/backend/base/langflow/custom/custom_component/component.py b/src/backend/base/langflow/custom/custom_component/component.py index 767f5fc7b..aaa16771d 100644 --- a/src/backend/base/langflow/custom/custom_component/component.py +++ b/src/backend/base/langflow/custom/custom_component/component.py @@ -71,13 +71,13 @@ class Component(CustomComponent): for output in self.outputs: # Build the output if it's connected to some other vertex # or if it's not connected to any vertex - if not vertex.outgoing_edges or output.display_name in vertex.edges_source_names: + if not vertex.outgoing_edges or output.name in vertex.edges_source_names: method: Callable | Awaitable = getattr(self, output.method) result = method() # If the method is asynchronous, we need to await it if inspect.iscoroutinefunction(method): result = await result - _results[output.display_name] = result + _results[output.name] = result self._results = _results return _results diff --git a/src/backend/base/langflow/field_typing/__init__.py b/src/backend/base/langflow/field_typing/__init__.py index 7ae9c61a9..9383008dc 100644 --- a/src/backend/base/langflow/field_typing/__init__.py +++ b/src/backend/base/langflow/field_typing/__init__.py @@ -29,18 +29,26 @@ from .constants import ( from .range_spec import RangeSpec -def _import_template_field(): +def _import_input_class(): from langflow.template.field.base import Input return Input +def _import_output_class(): + from langflow.template.field.base import Output + + return Output + + def __getattr__(name: str) -> Any: # This is to avoid circular imports if name == "Input": - return _import_template_field() + return _import_input_class() elif name == "RangeSpec": return RangeSpec + elif name == "Output": + return _import_output_class() # The other names should work as if they were imported from constants # Import the constants module langflow.field_typing.constants from . import constants