Another find->findOne

This commit is contained in:
Shane Kilkelly 2016-03-08 14:38:25 +00:00
parent 76af5e5563
commit 3e423b8a06

View file

@ -32,7 +32,7 @@ module.exports = ReferencesHandler =
return ids
_isFullIndex: (project, callback = (err, result) ->) ->
User.find { _id: project.owner_ref }, { features: true }, (err, owner) ->
User.findOne { _id: project.owner_ref }, { features: true }, (err, owner) ->
return callback(err) if err?
callback(null, owner?.features?.references == true)