From a9809ca6925a450115a99e6dafb6f415c95357ad Mon Sep 17 00:00:00 2001 From: guerler Date: Wed, 27 Jul 2016 11:26:01 -0400 Subject: [PATCH] Use default job history on build_for_rerun unless specified otherwise --- lib/galaxy/tools/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py index 8c60e5a80f7..cb195017aaa 100755 --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -1613,6 +1613,8 @@ class Tool( object, Dictifiable ): history = self.history_manager.get_owned( trans.security.decode_id( history_id ), trans.user, current_history=trans.history ) else: history = trans.get_history() + if history is None and job is not None: + history = self.history_manager.get_owned( job.history.id, trans.user, current_history=trans.history ) if history is None: raise exceptions.MessageException( 'History unavailable. Please specify a valid history id' ) except Exception as e: