Skip to content

Commit

Permalink
Merge pull request #217 from guerler/fix_missing_history
Browse files Browse the repository at this point in the history
[15.05] Create empty history if history is unavailable during api call
  • Loading branch information
dannon committed May 6, 2015
2 parents 4154af4 + f0f2f39 commit bb75068
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/tools/parameters/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1634,7 +1634,7 @@ def _get_history( self, trans, history=None ):
class_name = self.__class__.__name__
assert trans is not None, "%s requires a trans" % class_name
if history is None:
history = trans.get_history()
history = trans.get_history( create=True )
assert history is not None, "%s requires a history" % class_name
return history

Expand Down
2 changes: 1 addition & 1 deletion test/unit/tools/test_data_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def setUp( self ):
self.app.model.context.flush()
self.trans = bunch.Bunch(
app=self.app,
get_history=lambda: self.test_history,
get_history=lambda **k: self.test_history,
get_current_user_roles=lambda: [],
workflow_building_mode=False,
webapp=bunch.Bunch( name="galaxy" ),
Expand Down
2 changes: 1 addition & 1 deletion test/unit/tools/test_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def __init__( self, app, history ):
self.webapp = Bunch( name="galaxy" )
self.sa_session = self.app.model.context

def get_history( self ):
def get_history( self, **kwargs ):
return self.history


Expand Down
2 changes: 1 addition & 1 deletion test/unit/unittest_utils/galaxy_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def set_user( self, user ):

user = property( get_user, set_user )

def get_history( self ):
def get_history( self, **kwargs ):
return self.history

def set_history( self, history ):
Expand Down

0 comments on commit bb75068

Please sign in to comment.