From 37f3bf58bb7825204536f900e9babef44f4742b2 Mon Sep 17 00:00:00 2001 From: John Davis Date: Thu, 19 Oct 2023 16:27:38 -0400 Subject: [PATCH] Explicitly call unique() when joined eader loading This is one of the differences betwween the legacy API (Query) and the 2.0 API (Select). Ref: https://docs.sqlalchemy.org/en/20/changelog/migration_20.html#orm-rows-not-uniquified-by-default --- lib/galaxy/managers/workflows.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/managers/workflows.py b/lib/galaxy/managers/workflows.py index 4feccda7a36b..8d7d352fb692 100644 --- a/lib/galaxy/managers/workflows.py +++ b/lib/galaxy/managers/workflows.py @@ -255,7 +255,7 @@ def name_filter(term): stmt = stmt.limit(payload.limit) if payload.offset is not None: stmt = stmt.offset(payload.offset) - return trans.sa_session.scalars(stmt), total_matches + return trans.sa_session.scalars(stmt).unique(), total_matches def get_stored_workflow(self, trans, workflow_id, by_stored_id=True) -> StoredWorkflow: """Use a supplied ID (UUID or encoded stored workflow ID) to find