Skip to content

Commit

Permalink
remove history manager copy
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton authored and nsoranzo committed Aug 2, 2024
1 parent d7496f4 commit 5781992
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 0 additions & 6 deletions lib/galaxy/managers/histories.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions test/unit/app/managers/test_HistoryManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 5781992

Please sign in to comment.