From 2a0b0d3a870ba334f6a71e3655fc51a4f24aae8c Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Tue, 23 Jan 2018 10:21:05 +0000 Subject: [PATCH] only need to load rootFolder from project --- .../app/coffee/Features/Project/ProjectEntityHandler.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/web/app/coffee/Features/Project/ProjectEntityHandler.coffee b/services/web/app/coffee/Features/Project/ProjectEntityHandler.coffee index 89fc9fb42a..470545b8f9 100644 --- a/services/web/app/coffee/Features/Project/ProjectEntityHandler.coffee +++ b/services/web/app/coffee/Features/Project/ProjectEntityHandler.coffee @@ -171,7 +171,7 @@ module.exports = ProjectEntityHandler = return cb(null, project_or_id) else # id # need to retrieve full project structure to check for duplicates - return ProjectGetter.getProject project_or_id, {}, cb + return ProjectGetter.getProject project_or_id, {rootFolder:true, name:true}, cb getProject (error, project) -> if err? logger.err project_id:project_id, err:err, "error getting project for add doc" @@ -208,7 +208,7 @@ module.exports = ProjectEntityHandler = ProjectEntityHandler.addDoc project_id, null, name, lines, callback addFileWithoutUpdatingHistory: (project_id, folder_id, fileName, path, userId, callback = (error, fileRef, folder_id, path, fileStoreUrl) ->)-> - ProjectGetter.getProject project_id, {}, (err, project) -> + ProjectGetter.getProject project_id, {rootFolder:true, name:true}, (err, project) -> if err? logger.err project_id:project_id, err:err, "error getting project for add file" return callback(err) @@ -341,7 +341,7 @@ module.exports = ProjectEntityHandler = callback(null, folders, lastFolder) addFolder: (project_id, parentFolder_id, folderName, callback) -> - ProjectGetter.getProject project_id, {}, (err, project)=> + ProjectGetter.getProject project_id, {rootFolder:true, name:true}, (err, project)=> if err? logger.err project_id:project_id, err:err, "error getting project for add folder" return callback(err)