projects
/
mediagoblin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
692e8e7
)
Fix #1040 - Comments should have published attribute
author
Jessica Tallon
<jessica@megworld.co.uk>
Thu, 27 Nov 2014 10:12:53 +0000
(10:12 +0000)
committer
Jessica Tallon
<jessica@megworld.co.uk>
Thu, 27 Nov 2014 10:13:21 +0000
(10:13 +0000)
mediagoblin/db/models.py
patch
|
blob
|
blame
|
history
diff --git
a/mediagoblin/db/models.py
b/mediagoblin/db/models.py
index 8f722cff456bb420951637b55d97b1cd90c7dc97..7afd428d98c6ba8b5ce0d626982581c0a93a02f0 100644
(file)
--- 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: