mirror of
https://github.com/ansible/awx.git
synced 2026-05-13 12:27:37 -02:30
include error field in notification template's list of recent notifs
This commit is contained in:
@@ -4374,7 +4374,7 @@ class NotificationTemplateSerializer(BaseSerializer):
|
|||||||
return res
|
return res
|
||||||
|
|
||||||
def _recent_notifications(self, obj):
|
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):
|
def get_summary_fields(self, obj):
|
||||||
d = super(NotificationTemplateSerializer, self).get_summary_fields(obj)
|
d = super(NotificationTemplateSerializer, self).get_summary_fields(obj)
|
||||||
|
|||||||
Reference in New Issue
Block a user