diff --git a/services/web/app/coffee/Features/Project/ProjectEntityHandler.coffee b/services/web/app/coffee/Features/Project/ProjectEntityHandler.coffee index dfbfb26a9d..66e7359389 100644 --- a/services/web/app/coffee/Features/Project/ProjectEntityHandler.coffee +++ b/services/web/app/coffee/Features/Project/ProjectEntityHandler.coffee @@ -123,7 +123,7 @@ module.exports = ProjectEntityHandler = doc = new Doc name: docName Project.putElement project._id, folder_id, doc, "doc", (err, result)=> return callback(err) if err? - DocstoreManager.updateDoc project._id.toString(), doc._id.toString(), docLines, 0, (err, modified, rev) -> + DocstoreManager.updateDoc project._id.toString(), doc._id.toString(), docLines, (err, modified, rev) -> return callback(err) if err? tpdsUpdateSender.addDoc { project_id: project._id, diff --git a/services/web/test/UnitTests/coffee/Project/ProjectEntityHandlerTests.coffee b/services/web/test/UnitTests/coffee/Project/ProjectEntityHandlerTests.coffee index 77d8232d4b..0932ea5d25 100644 --- a/services/web/test/UnitTests/coffee/Project/ProjectEntityHandlerTests.coffee +++ b/services/web/test/UnitTests/coffee/Project/ProjectEntityHandlerTests.coffee @@ -305,7 +305,7 @@ describe 'ProjectEntityHandler', -> @ProjectModel.putElement = sinon.stub().callsArgWith(4, null, {path:{fileSystem:@path}}) @callback = sinon.stub() @tpdsUpdateSender.addDoc = sinon.stub().callsArg(2) - @DocstoreManager.updateDoc = sinon.stub().callsArgWith(4, null, true, 0) + @DocstoreManager.updateDoc = sinon.stub().callsArgWith(3, null, true, 0) @ProjectEntityHandler.addDoc project_id, folder_id, @name, @lines, @callback @@ -335,7 +335,7 @@ describe 'ProjectEntityHandler', -> it "should send the doc lines to the doc store", -> @DocstoreManager.updateDoc - .calledWith(project_id, @doc._id.toString(), @lines, 0) + .calledWith(project_id, @doc._id.toString(), @lines) .should.equal true describe 'adding file', ->