Skip to content

Commit

Permalink
Mark item as updated when undelete had no effect
Browse files Browse the repository at this point in the history
Usually if the dataset was not deleted or if it was purged and un-deleting does not do anything
  • Loading branch information
davelopez committed Apr 29, 2024
1 parent 843b7a5 commit 0506264
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/galaxy/webapps/galaxy/services/history_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -1445,6 +1445,9 @@ def _undelete(self, item: HistoryItemModel):
raise exceptions.ItemDeletionException("This item has been permanently deleted and cannot be recovered.")
manager = self._get_item_manager(item)
manager.undelete(item, flush=self.flush)
# Again, we need to force an update in the edge case where all selected items are already undeleted
# or when the item was purged as undelete will not trigger an update
item.update()

def _purge(self, item: HistoryItemModel, trans: ProvidesHistoryContext):
if getattr(item, "purged", False):
Expand Down

0 comments on commit 0506264

Please sign in to comment.