From 1f86cad592fb44dbbb37be54461c5eec1ebb7303 Mon Sep 17 00:00:00 2001 From: John Davis Date: Fri, 21 Jul 2023 16:10:15 -0400 Subject: [PATCH] Fix SA2.0 (query->select) in galaxy.datatypes --- lib/galaxy/datatypes/display_applications/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/datatypes/display_applications/util.py b/lib/galaxy/datatypes/display_applications/util.py index aefc65d9ff12..47a70b706e8e 100644 --- a/lib/galaxy/datatypes/display_applications/util.py +++ b/lib/galaxy/datatypes/display_applications/util.py @@ -17,13 +17,13 @@ def decode_dataset_user(trans, dataset_hash, user_hash): # decode dataset id as usual # decode user id using the dataset create time as the key dataset_id = trans.security.decode_id(dataset_hash) - dataset = trans.sa_session.query(trans.app.model.HistoryDatasetAssociation).get(dataset_id) + dataset = trans.sa_session.get(trans.app.model.HistoryDatasetAssociation, dataset_id) assert dataset, "Bad Dataset id provided to decode_dataset_user" if user_hash in [None, "None"]: user = None else: security = IdEncodingHelper(id_secret=dataset.create_time) user_id = security.decode_id(user_hash) - user = trans.sa_session.query(trans.app.model.User).get(user_id) + user = trans.sa_session.get(trans.app.model.User, user_id) assert user, "A Bad user id was passed to decode_dataset_user" return dataset, user