From 8695d9058398f3de2074ae1c6e06c3e5f652f052 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 6 Mar 2024 14:21:22 -0300 Subject: [PATCH] Add example flows to user flows --- src/backend/langflow/api/v1/flows.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/langflow/api/v1/flows.py b/src/backend/langflow/api/v1/flows.py index 06741ba1d..60fc0070c 100644 --- a/src/backend/langflow/api/v1/flows.py +++ b/src/backend/langflow/api/v1/flows.py @@ -62,6 +62,7 @@ def read_flows( flows = current_user.flows flows = validate_is_component(flows) + flow_ids = [flow.id for flow in flows] # with the session get the flows that DO NOT have a user_id try: example_flows = session.exec( @@ -70,7 +71,7 @@ def read_flows( ) ).all() # noqa for example_flow in example_flows: - if example_flow not in flows: + if example_flow.id not in flow_ids: flows.append(example_flow) except Exception as e: logger.error(e)