diff options
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 |