Skip to content

Commit

Permalink
Merge pull request #3457 from refinery-platform/ilan-gold/fix_problem…
Browse files Browse the repository at this point in the history
…atic_python2_code

Update Buggy Code in Advance of Python 3 Update
  • Loading branch information
ilan-gold committed Oct 10, 2019
2 parents 66f92d5 + c8ee5bc commit bf46b82
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions refinery/analysis_manager/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def test__check_galaxy_history_state_progress_less_than_percent_complete(
galaxy_progress_mock
):
self.analysis_status.galaxy_history_progress = 25
self.analysis_status.save()
_check_galaxy_history_state(self.analysis.uuid)

analysis_status = AnalysisStatus.objects.get(analysis=self.analysis)
Expand All @@ -128,6 +129,7 @@ def test__check_galaxy_history_state_percent_complete_is_100(
galaxy_progress_mock
):
self.analysis_status.galaxy_history_progress = 100
self.analysis_status.save()
_check_galaxy_history_state(self.analysis.uuid)

analysis_status = AnalysisStatus.objects.get(analysis=self.analysis)
Expand Down
8 changes: 6 additions & 2 deletions refinery/tool_manager/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ def create(self, request, *args, **kwargs):
with transaction.atomic():
tool = create_tool(tool_launch_configuration, request.user)
tool.launch()
serializer = ToolSerializer(tool)
serializer = ToolSerializer(
tool, context={'request': request}
)
except Exception as e:
logger.error(e)
return HttpResponseBadRequest(e)
Expand Down Expand Up @@ -181,7 +183,9 @@ def relaunch(self, request, *args, **kwargs):
"currently running")
try:
visualization_tool.launch()
serializer = ToolSerializer(visualization_tool)
serializer = ToolSerializer(
visualization_tool, context={'request': request}
)
return JsonResponse(serializer.data)
except Exception as e:
logger.error(e)
Expand Down

0 comments on commit bf46b82

Please sign in to comment.