Be explicit in version filter

This commit is contained in:
James Allen 2016-11-30 15:29:43 +00:00
parent 9b0cef808a
commit e156d8017c

View file

@ -81,7 +81,7 @@ module.exports = DocManager =
callback null, true, oldRev + 1 # rev will have been incremented in mongo by MongoManager.updateDoc callback null, true, oldRev + 1 # rev will have been incremented in mongo by MongoManager.updateDoc
deleteDoc: (project_id, doc_id, callback = (error) ->) -> deleteDoc: (project_id, doc_id, callback = (error) ->) ->
DocManager.getDoc project_id, doc_id, {}, (error, doc) -> DocManager.getDoc project_id, doc_id, { version: false }, (error, doc) ->
return callback(error) if error? return callback(error) if error?
return callback new Errors.NotFoundError("No such project/doc to delete: #{project_id}/#{doc_id}") if !doc? return callback new Errors.NotFoundError("No such project/doc to delete: #{project_id}/#{doc_id}") if !doc?
MongoManager.upsertIntoDocCollection project_id, doc_id, doc.lines, (error) -> MongoManager.upsertIntoDocCollection project_id, doc_id, doc.lines, (error) ->