Skip to content

Return correct object instead of list in RunConfigDiff.new_tests

Tomi Sarvela requested to merge tsa/cibuglog:master into master

In RunConfigDiff new_tests can hide real status and returns empty list.

This causes issue in comparison where RunConfigResultsDiff is expected.

Fixes exception:

Traceback (most recent call last):
  File "./compare_runs.py", line 68, in <module>
    print(json.dumps(ser.to_representation(diff), sort_keys=True, indent=4))
  File "/lib/python3.7/site-packages/rest_framework/serializers.py", line 530, in to_representation
    ret[field.field_name] = field.to_representation(attribute)
  File "/lib/python3.7/site-packages/rest_framework/fields.py", line 1889, in to_representation
    return method(value)
  File "cibuglog/CIResults/serializers.py", line 235, in get_new_tests
    for k, v in obj.new_tests.tests.items()}
Edited by Tomi Sarvela

Merge request reports

Loading