Fix merge issues on stdout branch

The act of committing a PR that including part of these changes and then
reverting it meant that some of the changes from the original branch
didn't land in this new PR.   This commit adds the missing bits.

Lesson learned:  Create a new branch when submitting a PR on a
previously reverted PR
This commit is contained in:
Matthew Jones
2015-08-04 09:56:33 -04:00
parent e862e5ca7e
commit c231601b76
6 changed files with 18 additions and 1 deletions

View File

@@ -519,6 +519,11 @@ class UnifiedJobSerializer(BaseSerializer):
ret['elapsed'] = float(ret['elapsed'])
return ret
def get_result_stdout(self, obj):
obj_size = obj.result_stdout_size
if obj_size > settings.STDOUT_MAX_BYTES_DISPLAY:
return "Standard Output too large to display (%d bytes), only download supported for sizes over %d bytes" % (obj_size, settings.STDOUT_MAX_BYTES_DISPLAY)
return obj.result_stdout
class UnifiedJobListSerializer(UnifiedJobSerializer):