Commit 9975ac00 authored by Aurélien Bompard's avatar Aurélien Bompard Committed by Barry Warsaw

REST: add a self_link entry to held messages

parent 29947f0e
......@@ -52,6 +52,7 @@ When a message gets held for moderator approval, it shows up in this list.
reason: Because
request_id: 1
self_link: http://localhost:9001/3.0/lists/
sender: [email protected]
subject: Something
http_etag: "..."
......@@ -137,7 +137,11 @@ class HeldMessages(_HeldMessageBase, CollectionMixin):
def _resource_as_dict(self, request):
"""See `CollectionMixin`."""
return self._make_resource(
resource = self._make_resource(
if resource is not None:
resource['self_link'] = self.path_to('lists/{0}/held/{1}'.format(
self._mlist.list_id, resource['request_id']))
return resource
def _get_collection(self, request):
requests = IListRequests(self._mlist)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment