From 89107c996d8e1e7b53a0cf6d80185cc3fd9d875e Mon Sep 17 00:00:00 2001 From: John Chilton Date: Thu, 1 Aug 2024 11:50:47 -0400 Subject: [PATCH] remove history manager copy --- lib/galaxy/managers/histories.py | 6 ------ test/unit/app/managers/test_HistoryManager.py | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/galaxy/managers/histories.py b/lib/galaxy/managers/histories.py index 84db5dd38c2f..ae8c26b0922e 100644 --- a/lib/galaxy/managers/histories.py +++ b/lib/galaxy/managers/histories.py @@ -237,12 +237,6 @@ def p_tag_filter(term_text: str, quoted: bool): stmt = stmt.offset(payload.offset) return trans.sa_session.scalars(stmt), total_matches # type:ignore[return-value] - def copy(self, history, user, **kwargs): - """ - Copy and return the given `history`. - """ - return history.copy(target_user=user, **kwargs) - # .... sharable # overriding to handle anonymous users' current histories in both cases def by_user( diff --git a/test/unit/app/managers/test_HistoryManager.py b/test/unit/app/managers/test_HistoryManager.py index 021e348fc019..4d15f7a4b117 100644 --- a/test/unit/app/managers/test_HistoryManager.py +++ b/test/unit/app/managers/test_HistoryManager.py @@ -66,7 +66,7 @@ def test_base(self): == self.trans.sa_session.execute(select(model.History).filter(model.History.user == user2)).scalar_one() ) - history2 = self.history_manager.copy(history1, user=user3) + history2 =history1.copy(target_user=user3) self.log("should be able to query") histories = self.trans.sa_session.scalars(select(model.History)).all() @@ -108,7 +108,7 @@ def test_copy(self): self.app.tag_handler.set_tags_from_list(user=user2, item=hda, new_tags_list=hda_tags) self.hda_manager.annotate(hda, hda_annotation, user=user2) - history2 = self.history_manager.copy(history1, user=user3) + history2 = history1.copy(target_user=user3) assert isinstance(history2, model.History) assert history2.user == user3 assert history2 == self.trans.sa_session.get(model.History, history2.id)