Commit d0818242 authored by Tristan Cavelier's avatar Tristan Cavelier

revisions storage updated

parent c1dc8d70
......@@ -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);
};
......
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