Skip to content

Commit

Permalink
Fix 2 more cases of using strings to indicate load options
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Dec 11, 2023
1 parent ebbd7c3 commit 4664534
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/webapps/galaxy/controllers/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/galaxy/webapps/galaxy/controllers/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
)
)

Expand Down

0 comments on commit 4664534

Please sign in to comment.