diff --git a/core/server/models/post.js b/core/server/models/post.js index c9593d7de0..e7b44f4834 100644 --- a/core/server/models/post.js +++ b/core/server/models/post.js @@ -258,7 +258,7 @@ Post = ghostBookshelf.Model.extend({ } return qb.count(_.result(collection, 'idAttribute')).then(function (resp) { - var totalPosts = resp[0].aggregate, + var totalPosts = parseInt(resp[0].aggregate, 10), data = { posts: collection.toJSON(), page: parseInt(opts.page, 10),