diff options
author | xray7224 <xray7224@googlemail.com> | 2013-10-10 20:19:58 +0100 |
---|---|---|
committer | Jessica Tallon <jessica@megworld.co.uk> | 2014-07-22 23:13:15 +0100 |
commit | 7810817caf73bcc0dcdfe1cec249c86e3e77c148 (patch) | |
tree | 230f7c3fb51d968cb23718d16305a0c152d97871 /mediagoblin/db/models.py | |
parent | 3c3fa5e7bfd60fc80215c2c96ccf3c68be7b424e (diff) | |
download | mediagoblin-7810817caf73bcc0dcdfe1cec249c86e3e77c148.tar.lz mediagoblin-7810817caf73bcc0dcdfe1cec249c86e3e77c148.tar.xz mediagoblin-7810817caf73bcc0dcdfe1cec249c86e3e77c148.zip |
Refactors api uploading to media managers
Diffstat (limited to 'mediagoblin/db/models.py')
-rw-r--r-- | mediagoblin/db/models.py | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py index 215e7552..cc5d0afa 100644 --- a/mediagoblin/db/models.py +++ b/mediagoblin/db/models.py @@ -467,18 +467,16 @@ class MediaEntry(Base, MediaEntryMixin): if show_comments: comments = [comment.serialize(request) for comment in self.get_comments()] total = len(comments) - if total > 0: - # we only want to include replies if there are any. - context["replies"] = { - "totalItems": total, - "items": comments, - "url": request.urlgen( - "mediagoblin.federation.object.comments", - objectType=self.objectType, - uuid=self.slug, - qualified=True - ), - } + context["replies"] = { + "totalItems": total, + "items": comments, + "url": request.urlgen( + "mediagoblin.federation.object.comments", + objectType=self.objectType, + uuid=self.slug, + qualified=True + ), + } return context |