Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Dict/Unicode bug #3475

Merged
merged 2 commits into from
Oct 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions refinery/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1067,9 +1067,9 @@ def __str__(self):
self.summary)

def get_expanded_workflow_graph(self):
return tool_manager.utils.create_expanded_workflow_graph(
ast.literal_eval(self.workflow_copy)
)
self.refresh_from_db(fields=['workflow_copy'])
workflow_copy = ast.literal_eval(self.workflow_copy)
return tool_manager.utils.create_expanded_workflow_graph(workflow_copy)

def has_nodes_used_in_downstream_analyses(self):
"""
Expand Down
3 changes: 2 additions & 1 deletion refinery/tool_manager/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,8 @@ def _get_tool_inputs_dict(self, workflow_step):
def _get_workflow_dict(self):
# separate if-then assignment needed to avoid using the dict stored
# in workflow_copy before .save() is called
if self.analysis.workflow_copy == '' \
self.analysis.refresh_from_db(fields=['workflow_copy'])
if self.analysis.workflow_copy == u'' \
or self.analysis.workflow_copy is None:
workflow_copy = \
self.galaxy_connection.workflows.export_workflow_dict(
Expand Down