Skip to content

Commit

Permalink
Explicitly call unique() when joined eader loading
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jdavcs committed Oct 19, 2023
1 parent 104b97b commit 37f3bf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/galaxy/managers/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 37f3bf5

Please sign in to comment.