Commit 9268d81a authored by Tristan Cavelier's avatar Tristan Cavelier

fix revisionstorage error, it was writing doc._rev in sub_storage

parent 4ae4e5be
......@@ -474,6 +474,7 @@ jIO.addStorageType('revision', function (spec, my) {
f.postDocument = function (doctree_update_method) {
revs_info = priv.postToDocumentTree(doctree, doc);
doc._id = docid + "." + revs_info[0].rev;
delete doc._rev;
that.addJob(
"post",
priv.substorage,
......
......@@ -1198,6 +1198,7 @@ test ("Post", function(){
// check document
o.doc["_id"] = "post1."+o.rev;
delete o.doc._rev;
deepEqual(
localstorage.getItem(o.localpath + "/post1." + o.rev),
o.doc,
......@@ -1289,6 +1290,7 @@ test ("Put", function(){
// check document
o.doc._id = "put1." + o.rev;
delete o.doc._rev;
deepEqual(
localstorage.getItem(o.localpath + "/put1." + o.rev),
o.doc,
......
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