From 1c8f52daee64a337525ad54a549c6a0e60bb11f0 Mon Sep 17 00:00:00 2001 From: Jessica Tallon Date: Thu, 27 Nov 2014 10:12:53 +0000 Subject: [PATCH] Fix #1040 - Comments should have published attribute --- mediagoblin/db/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: -- 2.25.1