From e4eb03259b3e10e59b9abfa0daeb1a885101cfa6 Mon Sep 17 00:00:00 2001 From: Jim Ladd Date: Mon, 3 May 2021 12:11:36 -0700 Subject: [PATCH] include error field in notification template's list of recent notifs --- awx/api/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/api/serializers.py b/awx/api/serializers.py index c705a99dfd..48a6eebdfc 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -4374,7 +4374,7 @@ class NotificationTemplateSerializer(BaseSerializer): return res def _recent_notifications(self, obj): - return [{'id': x.id, 'status': x.status, 'created': x.created} for x in obj.notifications.all().order_by('-created')[:5]] + return [{'id': x.id, 'status': x.status, 'created': x.created, 'error': x.error} for x in obj.notifications.all().order_by('-created')[:5]] def get_summary_fields(self, obj): d = super(NotificationTemplateSerializer, self).get_summary_fields(obj)