mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 03:14:03 +03:00
Merge pull request #1088 from jacobian/postgres-fix
Fix #896 - work around errors in pagination under Postgresql.
This commit is contained in:
commit
4480d3bd02
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user