Commit 0b4d6afc authored by Tristan Cavelier's avatar Tristan Cavelier

revisions storage updated

parent f390e1bb
...@@ -504,9 +504,6 @@ jIO.addStorageType('revision', function (spec, my) { ...@@ -504,9 +504,6 @@ jIO.addStorageType('revision', function (spec, my) {
doc._id = priv.generateUuid(); doc._id = priv.generateUuid();
docid = doc._id; docid = doc._id;
} }
if (priv.update_doctree_allowed === undefined) {
priv.update_doctree_allowed = true;
}
f.getDocumentTree = function () { f.getDocumentTree = function () {
var option = command.cloneOption(); var option = command.cloneOption();
if (option.max_retry === 0) { if (option.max_retry === 0) {
...@@ -521,17 +518,7 @@ jIO.addStorageType('revision', function (spec, my) { ...@@ -521,17 +518,7 @@ jIO.addStorageType('revision', function (spec, my) {
function (response) { function (response) {
doctree = response; doctree = response;
if (priv.update_doctree_allowed) {
f.postDocument("put"); f.postDocument("put");
} else {
that.error({
"status": 409,
"statusText": "Conflict",
"error": "conflict",
"message": "Cannot update a document",
"reason": "Document update conflict"
});
}
}, },
function (err) { function (err) {
switch (err.status) { switch (err.status) {
...@@ -611,10 +598,6 @@ jIO.addStorageType('revision', function (spec, my) { ...@@ -611,10 +598,6 @@ jIO.addStorageType('revision', function (spec, my) {
* @param {object} command The JIO command * @param {object} command The JIO command
*/ */
that.put = function (command) { that.put = function (command) {
var doc = command.cloneDoc();
if (doc._rev === undefined && doc._revs === undefined) {
priv.update_doctree_allowed = false;
}
that.post(command); that.post(command);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment