0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Merge pull request #6126 from sebgie/option-restore

Restore options
This commit is contained in:
Hannah Wolfe 2015-12-02 12:13:36 +08:00
commit 7ebc7f7ff1

View file

@ -245,6 +245,7 @@ User = ghostBookshelf.Model.extend({
findOne: function findOne(data, options) {
var query,
status,
optInc,
lookupRole = data.role;
delete data.role;
@ -257,6 +258,7 @@ User = ghostBookshelf.Model.extend({
delete data.status;
options = options || {};
optInc = options.include;
options.withRelated = _.union(options.withRelated, options.include);
data = this.filterData(data);
@ -285,6 +287,7 @@ User = ghostBookshelf.Model.extend({
options = this.filterOptions(options, 'findOne');
delete options.include;
options.include = optInc;
return query.fetch(options);
},