Skip to content

Commit

Permalink
pass the toolbox obj to make sure cache is available
Browse files Browse the repository at this point in the history
  • Loading branch information
martenson committed Feb 28, 2018
1 parent e594b2b commit e9aad5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/tools/toolbox/base.py
Expand Up @@ -957,7 +957,7 @@ def to_dict(self, trans, in_panel=True, **kwds):
if elt.__class__.__name__ == 'Tool':
rval.append(self.get_tool_to_dict(trans, elt))
else:
kwargs = dict(trans=trans, link_details=True)
kwargs = dict(trans=trans, link_details=True, toolbox=self)
rval.append(elt.to_dict(**kwargs))
else:
filter_method = self._build_filter_method(trans)
Expand Down
6 changes: 3 additions & 3 deletions lib/galaxy/tools/toolbox/panel.py
Expand Up @@ -69,7 +69,7 @@ def copy(self):
copy.elems = self.elems.copy()
return copy

def to_dict(self, trans, link_details=False):
def to_dict(self, trans, link_details=False, toolbox=None):
""" Return a dict that includes section's attributes. """

section_dict = super(ToolSection, self).to_dict()
Expand All @@ -79,8 +79,8 @@ def to_dict(self, trans, link_details=False):
link_details=link_details
)
for elt in self.elems.values():
if elt.__class__.__name__ == 'Tool':
section_elts.append(trans.app.toolbox.get_tool_to_dict(trans, elt))
if elt.__class__.__name__ == 'Tool' and toolbox:
section_elts.append(toolbox.get_tool_to_dict(trans, elt))
else:
section_elts.append(elt.to_dict(**kwargs))
section_dict['elems'] = section_elts
Expand Down

0 comments on commit e9aad5e

Please sign in to comment.