2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00

Do not serialize toJSON to get published_at

This commit is contained in:
Fabian Becker 2015-07-20 16:38:25 +02:00
parent 27ecb3b211
commit ed0854d770

View file

@ -415,8 +415,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;