Merge pull request #2668 from guerler/default_job_history

Use default job history on build_for_rerun if current history is unavailable
This commit is contained in:
Dannon Baker
2016-07-27 13:13:23 -04:00
committed by GitHub
+2
View File
@@ -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: