From 7a3daf850017dc4510708b9cf7aae2005f5f4de1 Mon Sep 17 00:00:00 2001 From: Daniel Blankenberg Date: Tue, 7 May 2013 16:46:47 -0400 Subject: [PATCH] Fix for refreshing current history when copying datasets. --- lib/galaxy/webapps/galaxy/controllers/dataset.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/galaxy/webapps/galaxy/controllers/dataset.py b/lib/galaxy/webapps/galaxy/controllers/dataset.py index fb20536148c..a4a0029fcb1 100644 --- a/lib/galaxy/webapps/galaxy/controllers/dataset.py +++ b/lib/galaxy/webapps/galaxy/controllers/dataset.py @@ -1034,8 +1034,9 @@ class DatasetInterface( BaseUIController, UsesAnnotations, UsesHistoryMixin, Use user = trans.get_user() if source_history is not None: history = self.get_history(trans, source_history) + current_history = trans.get_history() else: - history = trans.get_history() + history = current_history = trans.get_history() refresh_frames = [] if source_dataset_ids: if not isinstance( source_dataset_ids, list ): @@ -1083,7 +1084,7 @@ class DatasetInterface( BaseUIController, UsesAnnotations, UsesHistoryMixin, Use else: for hist in target_histories: hist.add_dataset( hda.copy( copy_children = True ) ) - if history in target_histories: + if current_history in target_histories: refresh_frames = ['history'] trans.sa_session.flush() hist_names_str = ", ".join( ['%s' % @@ -1100,7 +1101,7 @@ class DatasetInterface( BaseUIController, UsesAnnotations, UsesHistoryMixin, Use target_histories = user.active_histories return trans.fill_template( "/dataset/copy_view.mako", source_history = history, - current_history = trans.get_history(), + current_history = current_history, source_dataset_ids = source_dataset_ids, target_history_id = target_history_id, target_history_ids = target_history_ids,