Use default job history on build_for_rerun unless specified otherwise

This commit is contained in:
guerler
2016-07-27 11:29:54 -04:00
parent d9e52c671f
commit a9809ca692
+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: