From cf688adf5313eab1d87d28ca28e6f3a4c93fb31a Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Fri, 21 Jul 2023 23:15:53 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20feat(custom=5Fcomponent.py):=20a?= =?UTF-8?q?dd=20method=20list=5Fflow=5Fnames()=20to=20retrieve=20a=20list?= =?UTF-8?q?=20of=20flow=20names=20from=20the=20database?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🐛 fix(custom_component.py): remove unused build() method to improve code cleanliness and avoid confusion --- src/backend/langflow/interface/custom/custom_component.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/backend/langflow/interface/custom/custom_component.py b/src/backend/langflow/interface/custom/custom_component.py index b910c14e9..79ca64bdc 100644 --- a/src/backend/langflow/interface/custom/custom_component.py +++ b/src/backend/langflow/interface/custom/custom_component.py @@ -147,5 +147,10 @@ class CustomComponent(Component, extra=Extra.allow): raise ValueError(f"Flow {flow_id} not found") return build_sorted_vertices_with_caching(data_graph) + def list_flow_names(self): + with session_getter() as session: + flows = session.query(Flow).all() + return [flow.name for flow in flows] + def build(self): raise NotImplementedError