diff --git a/lib/galaxy/webapps/galaxy/services/history_contents.py b/lib/galaxy/webapps/galaxy/services/history_contents.py index 86b09ac29b11..1743bf3c453f 100644 --- a/lib/galaxy/webapps/galaxy/services/history_contents.py +++ b/lib/galaxy/webapps/galaxy/services/history_contents.py @@ -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):