From 4664534497b8f8cc3532487fbe4548a98a667cb4 Mon Sep 17 00:00:00 2001 From: John Davis Date: Mon, 11 Dec 2023 17:10:15 -0500 Subject: [PATCH] Fix 2 more cases of using strings to indicate load options --- lib/galaxy/webapps/galaxy/controllers/history.py | 2 +- lib/galaxy/webapps/galaxy/controllers/page.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/galaxy/webapps/galaxy/controllers/history.py b/lib/galaxy/webapps/galaxy/controllers/history.py index 293261eb289c..50cb04bbb20f 100644 --- a/lib/galaxy/webapps/galaxy/controllers/history.py +++ b/lib/galaxy/webapps/galaxy/controllers/history.py @@ -116,7 +116,7 @@ def sort(self, trans, query, ascending, column_name=None): def build_initial_query(self, trans, **kwargs): # Override to preload sharing information used when fetching data for grid. query = super().build_initial_query(trans, **kwargs) - query = query.options(undefer(History.users_shared_with_count)) + query = query.options(undefer(self.model_class.users_shared_with_count)) return query # Grid definition diff --git a/lib/galaxy/webapps/galaxy/controllers/page.py b/lib/galaxy/webapps/galaxy/controllers/page.py index 7fb4112070a8..6b65c7917e77 100644 --- a/lib/galaxy/webapps/galaxy/controllers/page.py +++ b/lib/galaxy/webapps/galaxy/controllers/page.py @@ -168,9 +168,9 @@ def build_initial_query(self, trans, **kwargs): .join("user") .filter(model.User.deleted == false()) .options( - joinedload(self.model_class.user).load_only("username"), + joinedload(self.model_class.user).load_only(self.model_class.username), joinedload(self.model_class.annotations), - undefer("average_rating"), + undefer(self.model_class.average_rating), ) )