From 0b4d6afc663f5b8ff4cab5e97f6dbfa75f9a9567 Mon Sep 17 00:00:00 2001 From: Tristan Cavelier <tristan.cavelier@tiolive.com> Date: Fri, 1 Feb 2013 14:51:55 +0100 Subject: [PATCH] revisions storage updated --- src/jio.storage/revisionstorage.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/jio.storage/revisionstorage.js b/src/jio.storage/revisionstorage.js index 37e84a9..75b20f8 100644 --- a/src/jio.storage/revisionstorage.js +++ b/src/jio.storage/revisionstorage.js @@ -504,9 +504,6 @@ jIO.addStorageType('revision', function (spec, my) { doc._id = priv.generateUuid(); docid = doc._id; } - if (priv.update_doctree_allowed === undefined) { - priv.update_doctree_allowed = true; - } f.getDocumentTree = function () { var option = command.cloneOption(); if (option.max_retry === 0) { @@ -521,17 +518,7 @@ jIO.addStorageType('revision', function (spec, my) { function (response) { doctree = response; - if (priv.update_doctree_allowed) { - f.postDocument("put"); - } else { - that.error({ - "status": 409, - "statusText": "Conflict", - "error": "conflict", - "message": "Cannot update a document", - "reason": "Document update conflict" - }); - } + f.postDocument("put"); }, function (err) { switch (err.status) { @@ -611,10 +598,6 @@ jIO.addStorageType('revision', function (spec, my) { * @param {object} command The JIO command */ that.put = function (command) { - var doc = command.cloneDoc(); - if (doc._rev === undefined && doc._revs === undefined) { - priv.update_doctree_allowed = false; - } that.post(command); }; -- 2.30.9