Fix #5363 - Collections don't serialize correctly
authorJessica Tallon <tsyesika@tsyesika.se>
Wed, 25 Nov 2015 14:57:46 +0000 (14:57 +0000)
committerJessica Tallon <tsyesika@tsyesika.se>
Wed, 25 Nov 2015 14:57:46 +0000 (14:57 +0000)
mediagoblin/db/models.py

index c380c9188e6f91894ce26ffab7e61f2ee8192d90..77f8a1b80be6899b6afba423033a4d9e1fa4ae3e 100644 (file)
@@ -1152,7 +1152,7 @@ class Collection(Base, CollectionMixin, CommentingMixin):
         # Get all serialized output in a list
         items = [i.serialize(request) for i in self.get_collection_items()]
         return {
-            "totalItems": self.items,
+            "totalItems": self.num_items,
             "url": self.url_for_self(request.urlgen, qualified=True),
             "items": items,
         }