diff options
| author | Barry Warsaw | 2015-12-12 20:26:09 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2015-12-12 20:26:09 -0500 |
| commit | 4eaed33f2e7ddab482dbca7d8e945455b73dfb46 (patch) | |
| tree | 45cdc34c1e6179f9a95b88ccc18c7cd7b9c2f50a /src/mailman/rest/helpers.py | |
| parent | c972f9d5504469890ba72e81cd662d18f1ee4c13 (diff) | |
| download | mailman-4eaed33f2e7ddab482dbca7d8e945455b73dfb46.tar.gz mailman-4eaed33f2e7ddab482dbca7d8e945455b73dfb46.tar.zst mailman-4eaed33f2e7ddab482dbca7d8e945455b73dfb46.zip | |
Diffstat (limited to 'src/mailman/rest/helpers.py')
| -rw-r--r-- | src/mailman/rest/helpers.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mailman/rest/helpers.py b/src/mailman/rest/helpers.py index 0cdd40e7e..e20324cfd 100644 --- a/src/mailman/rest/helpers.py +++ b/src/mailman/rest/helpers.py @@ -134,7 +134,9 @@ class CollectionMixin: def _resource_as_json(self, resource): """Return the JSON formatted representation of the resource.""" - return etag(self._resource_as_dict(resource)) + resource = self._resource_as_dict(resource) + assert resource is not None, resource + return etag(resource) def _get_collection(self, request): """Return the collection as a concrete list. @@ -175,6 +177,7 @@ class CollectionMixin: if len(collection) != 0: entries = [self._resource_as_dict(resource) for resource in collection] + assert None not in entries, entries # Tag the resources but use the dictionaries. [etag(resource) for resource in entries] # Create the collection resource |
