From f6ac13568f62731fb785e3aafafbf3aacf21a7a2 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Fri, 2 Feb 2018 00:06:53 -0500 Subject: [PATCH] Don't fail rest of multi-action queue when attempting to purge a collection. Fixes https://github.com/galaxyproject/galaxy/issues/5117. --- client/galaxy/scripts/mvc/history/history-view-edit.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/galaxy/scripts/mvc/history/history-view-edit.js b/client/galaxy/scripts/mvc/history/history-view-edit.js index 47ab7d82e3c1..29df8a91b925 100644 --- a/client/galaxy/scripts/mvc/history/history-view-edit.js +++ b/client/galaxy/scripts/mvc/history/history-view-edit.js @@ -275,7 +275,12 @@ var HistoryViewEdit = _super.extend( func: function() { if (confirm(_l("This will permanently remove the data in your datasets. Are you sure?"))) { var action = HDA_MODEL.HistoryDatasetAssociation.prototype.purge; - panel.getSelectedModels().ajaxQueue(action); + const historyContents = panel.getSelectedModels(); + const selectedDatasets = historyContents.filter( + c => + c.get("history_content_type") == "dataset" + ) + historyContents.ajaxQueue(action, {}, selectedDatasets); } } });