diff options
author | Jessica Tallon <jessica@megworld.co.uk> | 2014-11-27 10:12:53 +0000 |
---|---|---|
committer | Jessica Tallon <jessica@megworld.co.uk> | 2014-11-27 10:13:21 +0000 |
commit | 1c8f52daee64a337525ad54a549c6a0e60bb11f0 (patch) | |
tree | e2c39a945ad35571e4542706caf17fc516a4a30d | |
parent | 692e8e78486bf47bb6d83e28d0928c16b175715a (diff) | |
download | mediagoblin-1c8f52daee64a337525ad54a549c6a0e60bb11f0.tar.lz mediagoblin-1c8f52daee64a337525ad54a549c6a0e60bb11f0.tar.xz mediagoblin-1c8f52daee64a337525ad54a549c6a0e60bb11f0.zip |
Fix #1040 - Comments should have published attribute
-rw-r--r-- | mediagoblin/db/models.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mediagoblin/db/models.py b/mediagoblin/db/models.py index 8f722cff..7afd428d 100644 --- a/mediagoblin/db/models.py +++ b/mediagoblin/db/models.py @@ -769,12 +769,15 @@ class MediaComment(Base, MediaCommentMixin): ) media = MediaEntry.query.filter_by(id=self.media_entry).first() author = self.get_author + published = UTC.localize(self.created) context = { "id": href, "objectType": self.object_type, "content": self.content, "inReplyTo": media.serialize(request, show_comments=False), - "author": author.serialize(request) + "author": author.serialize(request), + "published": published.isoformat(), + "updated": published.isoformat(), } if self.location: |