diff --git a/tests/webapp/api/test_performance_alertsummary_api.py b/tests/webapp/api/test_performance_alertsummary_api.py index 47c15bcc688..9bb01cc682a 100644 --- a/tests/webapp/api/test_performance_alertsummary_api.py +++ b/tests/webapp/api/test_performance_alertsummary_api.py @@ -88,6 +88,7 @@ def test_alert_summaries_get( "related_alerts", "repository", "push_id", + "original_revision", "status", "revision", "push_timestamp", @@ -167,6 +168,7 @@ def test_alert_summaries_get_onhold( "related_alerts", "repository", "push_id", + "original_revision", "status", "revision", "push_timestamp", diff --git a/treeherder/webapp/api/performance_serializers.py b/treeherder/webapp/api/performance_serializers.py index 2c74908fa8d..3430c88dc2e 100644 --- a/treeherder/webapp/api/performance_serializers.py +++ b/treeherder/webapp/api/performance_serializers.py @@ -273,8 +273,11 @@ class PerformanceAlertSummarySerializer(serializers.ModelSerializer): ) repository = serializers.SlugRelatedField(read_only=True, slug_field="name") framework = serializers.SlugRelatedField(read_only=True, slug_field="id") - revision = serializers.SlugRelatedField(read_only=False, slug_field="revision", source="push", required=False, queryset=Push.objects.all()) - original_revision = serializers.SlugRelatedField(read_only=True, slug_field="revision", source="original_push") + revision = serializers.SlugRelatedField(read_only=False, slug_field="revision", + source="push",required=False, + queryset=Push.objects.all()) + original_revision = serializers.SlugRelatedField(read_only=True, slug_field="revision", + source="original_push") push_timestamp = TimestampField(source="push", read_only=True) prev_push_revision = serializers.SlugRelatedField( read_only=True, slug_field="revision", source="prev_push"