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)