diff --git a/core/server/models/base/index.js b/core/server/models/base/index.js index 38b58ca13f..1d9e3e68c0 100644 --- a/core/server/models/base/index.js +++ b/core/server/models/base/index.js @@ -514,6 +514,8 @@ ghostBookshelf.Model = ghostBookshelf.Model.extend({ return baseOptions.concat(extraOptions, ['require']); case 'findAll': return baseOptions.concat(extraOptions, ['columns']); + case 'findPage': + return baseOptions.concat(extraOptions, ['filter']); default: return baseOptions.concat(extraOptions); } diff --git a/core/server/models/post.js b/core/server/models/post.js index aa5e5f2fea..2fa7feef49 100644 --- a/core/server/models/post.js +++ b/core/server/models/post.js @@ -658,7 +658,7 @@ Post = ghostBookshelf.Model.extend({ // these are the only options that can be passed to Bookshelf / Knex. validOptions = { findOne: ['columns', 'importing', 'withRelated', 'require'], - findPage: ['page', 'limit', 'columns', 'filter', 'order', 'status', 'staticPages'], + findPage: ['page', 'limit', 'columns', 'order', 'status', 'staticPages'], findAll: ['columns', 'filter'], destroy: ['destroyAll'] }; diff --git a/core/server/models/subscriber.js b/core/server/models/subscriber.js index da216e0fe6..d0a40d504a 100644 --- a/core/server/models/subscriber.js +++ b/core/server/models/subscriber.js @@ -42,7 +42,7 @@ Subscriber = ghostBookshelf.Model.extend({ // whitelists for the `options` hash argument on methods, by method name. // these are the only options that can be passed to Bookshelf / Knex. validOptions = { - findPage: ['page', 'limit', 'columns', 'filter', 'order'], + findPage: ['page', 'limit', 'columns', 'order'], findAll: ['columns'] }; diff --git a/core/server/models/tag.js b/core/server/models/tag.js index 86fc7c3199..62fed24415 100644 --- a/core/server/models/tag.js +++ b/core/server/models/tag.js @@ -74,7 +74,7 @@ Tag = ghostBookshelf.Model.extend({ // whitelists for the `options` hash argument on methods, by method name. // these are the only options that can be passed to Bookshelf / Knex. validOptions = { - findPage: ['page', 'limit', 'columns', 'filter', 'order'], + findPage: ['page', 'limit', 'columns', 'order'], findAll: ['columns'], findOne: ['visibility'], destroy: ['destroyAll'] diff --git a/core/server/models/user.js b/core/server/models/user.js index 7e88c7749e..0e36039b78 100644 --- a/core/server/models/user.js +++ b/core/server/models/user.js @@ -338,7 +338,7 @@ User = ghostBookshelf.Model.extend({ setup: ['id'], edit: ['withRelated', 'importPersistUser'], add: ['importPersistUser'], - findPage: ['page', 'limit', 'columns', 'filter', 'order', 'status'], + findPage: ['page', 'limit', 'columns', 'order', 'status'], findAll: ['filter'] };