Skip to content

Commit

Permalink
Add app property to workflow contents manager.
Browse files Browse the repository at this point in the history
Most other managers already have this.
  • Loading branch information
jmchilton committed Nov 15, 2015
1 parent 8189fb4 commit 0b070f4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions lib/galaxy/managers/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ def build_invocations_query( self, trans, decoded_stored_workflow_id ):

class WorkflowContentsManager(UsesAnnotations):

def __init__(self, app):
self.app = app

def build_workflow_from_dict(
self,
trans,
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/web/base/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@ def _workflow_from_dict( self, trans, data, source=None, add_to_menu=False, publ
Creates a workflow from a dict. Created workflow is stored in the database and returned.
"""
# TODO: replace this method with direct access to manager.
workflow_contents_manager = workflows.WorkflowContentsManager()
workflow_contents_manager = workflows.WorkflowContentsManager( self.app )
created_workflow = workflow_contents_manager.build_workflow_from_dict(
trans,
data,
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/webapps/galaxy/api/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__( self, app ):
super( WorkflowsAPIController, self ).__init__( app )
self.history_manager = histories.HistoryManager( app )
self.workflow_manager = workflows.WorkflowsManager( app )
self.workflow_contents_manager = workflows.WorkflowContentsManager()
self.workflow_contents_manager = workflows.WorkflowContentsManager( app )

@expose_api
def index(self, trans, **kwd):
Expand Down

0 comments on commit 0b070f4

Please sign in to comment.