diff --git a/services/web/app/coffee/models/Project.coffee b/services/web/app/coffee/models/Project.coffee index 3a391adfc0..147ff12911 100644 --- a/services/web/app/coffee/models/Project.coffee +++ b/services/web/app/coffee/models/Project.coffee @@ -43,23 +43,6 @@ ProjectSchema.statics.getProject = (project_or_id, fields, callback)-> return callback(new Errors.NotFoundError(e.message)) this.findById project_or_id, fields, callback -ProjectSchema.statics.findPopulatedById = (project_id, callback)-> - logger.log project_id:project_id, "findPopulatedById" - this.find(_id: project_id ) - .populate('collaberator_refs') - .populate('readOnly_refs') - .populate('owner_ref') - .exec (err, projects)-> - if err? - logger.err err:err, project_id:project_id, "something went wrong looking for project findPopulatedById" - callback(err) - else if !projects? || projects.length == 0 - logger.err project_id:project_id, "something went wrong looking for project findPopulatedById, no project could be found" - callback "not found" - else - logger.log project_id:project_id, "finished findPopulatedById" - callback(null, projects[0]) - sanitizeTypeOfElement = (elementType)-> lastChar = elementType.slice -1 if lastChar != "s"