mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
Fix stdout plaintext render
* Was rendering as json (though text/plain) * Switched to rendering it as normal text with stripped ansi * Fixes: https://trello.com/c/TMyOak0H/142-api-v1-jobs-n-stdout-format-txt-emits-json-output
This commit is contained in:
parent
a76b1a0432
commit
c5ce9cdc12
@ -2838,6 +2838,8 @@ class UnifiedJobStdout(RetrieveAPIView):
|
||||
return response
|
||||
except Exception, e:
|
||||
return Response({"error": "Error generating stdout download file: %s" % str(e)}, status=status.HTTP_400_BAD_REQUEST)
|
||||
elif request.accepted_renderer.format == 'txt':
|
||||
return Response(unified_job.result_stdout)
|
||||
else:
|
||||
return super(UnifiedJobStdout, self).retrieve(request, *args, **kwargs)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user