mirror of
https://github.com/ansible/awx.git
synced 2026-04-09 12:09:20 -02:30
Merge pull request #10094 from jladdjr/awx_8853_add_notification_error_to_nt_listview
add notification error to notification template list view In support of #8853 Updates /api/v2/notification_templates to include the error field for summary_fields -> recent_notifications Reviewed-by: Bianca Henderson <beeankha@gmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user