Skip to content

Commit

Permalink
Move update to tag handler
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed Apr 30, 2024
1 parent a1fc936 commit 407708f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions lib/galaxy/model/tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def set_tags_from_list(
if flush:
with transaction(self.sa_session):
self.sa_session.commit()
item.update()
return item.tags

def get_tag_assoc_class(self, item_class):
Expand Down
4 changes: 0 additions & 4 deletions lib/galaxy/webapps/galaxy/services/history_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -1513,10 +1513,6 @@ def _change_dbkey(self, item: HistoryItemModel, params: ChangeDbkeyOperationPara

def _add_tags(self, trans: ProvidesUserContext, item: HistoryItemModel, params: TagOperationParams):
trans.tag_handler.add_tags_from_list(trans.user, item, params.tags, flush=self.flush)
# Changing tags does not change the item, but we need to update the history to trigger the completion of the operation
item.update()

def _remove_tags(self, trans: ProvidesUserContext, item: HistoryItemModel, params: TagOperationParams):
trans.tag_handler.remove_tags_from_list(trans.user, item, params.tags, flush=self.flush)
# Changing tags does not change the item, but we need to update the history to trigger the completion of the operation
item.update()

0 comments on commit 407708f

Please sign in to comment.