From dbbbc6c498a88d413bbc2b63f97a91eba221aa38 Mon Sep 17 00:00:00 2001 From: Sergey Golitsynskiy Date: Wed, 16 Mar 2022 16:32:54 -0400 Subject: [PATCH] Use class attr in load options (_contained_id_map) TODO: database.actions can be fixed only after moving Dataset to declarative mapping. --- lib/galaxy/managers/history_contents.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/galaxy/managers/history_contents.py b/lib/galaxy/managers/history_contents.py index a3587892ca7..d5f5eab2f69 100644 --- a/lib/galaxy/managers/history_contents.py +++ b/lib/galaxy/managers/history_contents.py @@ -406,10 +406,10 @@ class HistoryContentsManager(base.SortableManager): self._session() .query(component_class) .filter(component_class.id.in_(id_list)) - .options(undefer("_metadata")) - .options(eagerload("dataset.actions")) - .options(eagerload("tags")) - .options(eagerload("annotations")) + .options(undefer(component_class._metadata)) + .options(eagerload("dataset.actions")) # TODO: use class attr after moving Dataset to declarative mapping. + .options(eagerload(component_class.tags)) + .options(eagerload(component_class.annotations)) ) return {row.id: row for row in query.all()}