Work with ObjectId's passed to ProjectGetter

This commit is contained in:
James Allen 2014-05-06 13:34:37 +01:00
parent 2fb8b0e807
commit 628fb65bc3

View file

@ -10,7 +10,7 @@ module.exports = ProjectGetter =
excludes = {} excludes = {}
for i in [1..@EXCLUDE_DEPTH] for i in [1..@EXCLUDE_DEPTH]
excludes["rootFolder#{Array(i).join(".folder")}.docs.lines"] = 0 excludes["rootFolder#{Array(i).join(".folder")}.docs.lines"] = 0
db.projects.find _id: ObjectId(project_id), excludes, (error, projects = []) -> db.projects.find _id: ObjectId(project_id.toString()), excludes, (error, projects = []) ->
callback error, projects[0] callback error, projects[0]
getProject: (query, projection, callback = (error, project) ->) -> getProject: (query, projection, callback = (error, project) ->) ->