0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Merge pull request #5591 from halfdan/fix/5573

Do not serialize toJSON to get published_at
This commit is contained in:
Hannah Wolfe 2015-07-21 16:54:24 +01:00
commit a0ee69d365

View file

@ -414,8 +414,7 @@ Post = ghostBookshelf.Model.extend({
return ghostBookshelf.Model.findOne.call(this, data, options).then(function then(post) {
if ((withNext || withPrev) && post && !post.page) {
var postData = post.toJSON(options),
publishedAt = postData.published_at,
var publishedAt = post.get('published_at'),
prev,
next;