include error field in notification template's list of recent notifs

This commit is contained in:
Jim Ladd 2021-05-03 12:11:36 -07:00
parent e0d6b138b0
commit e4eb03259b

View File

@ -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)