diff --git a/templates/root/history.mako b/templates/root/history.mako index 440ebe66cbe..5db3de9223b 100644 --- a/templates/root/history.mako +++ b/templates/root/history.mako @@ -248,13 +248,20 @@ div#footer { <%namespace file="history_common.mako" import="render_dataset" /> -%if ( show_deleted and not history.activatable_datasets ) or ( not show_deleted and not history.active_datasets ): +<% + activatable_datasets = [] + for hda in history.datasets: + if not hda.dataset.purged: + activatable_datasets.append( hda ) +%> + +%if ( show_deleted and not activatable_datasets ) or ( not show_deleted and not history.active_datasets ):