From 5c90a9013c31f9ca4beadaca201fd86b9961e22e Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Mon, 27 Nov 2023 21:51:10 -0300 Subject: [PATCH] Fix user_id attribute in list_flows method --- src/backend/langflow/interface/custom/custom_component.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/backend/langflow/interface/custom/custom_component.py b/src/backend/langflow/interface/custom/custom_component.py index 98be2299e..f887ed025 100644 --- a/src/backend/langflow/interface/custom/custom_component.py +++ b/src/backend/langflow/interface/custom/custom_component.py @@ -5,7 +5,6 @@ from uuid import UUID import yaml from cachetools import TTLCache, cachedmethod from fastapi import HTTPException - from langflow.field_typing.constants import CUSTOM_COMPONENT_SUPPORTED_TYPES from langflow.interface.custom.component import Component from langflow.interface.custom.directory_reader import DirectoryReader @@ -232,7 +231,7 @@ class CustomComponent(Component): return await build_sorted_vertices(graph_data, self.user_id) def list_flows(self, *, get_session: Optional[Callable] = None) -> List[Flow]: - if not self.user_id: + if not self._user_id: raise ValueError("Session is invalid") try: get_session = get_session or session_getter