Commit ff82e666 authored by Tristan Cavelier's avatar Tristan Cavelier

Fixed: revision storage putAttachment loses document metadata

parent 10eaa65f
...@@ -633,7 +633,8 @@ jIO.addStorageType("revision", function (spec, my) { ...@@ -633,7 +633,8 @@ jIO.addStorageType("revision", function (spec, my) {
} }
return onEnd(undefined, res_doc); return onEnd(undefined, res_doc);
} }
if (specific_parameter.removeAttachment) { if (specific_parameter.putAttachment ||
specific_parameter.removeAttachment) {
// copy metadata (not beginning by "_" to document // copy metadata (not beginning by "_" to document
for (k in res_doc) { for (k in res_doc) {
if (res_doc.hasOwnProperty(k) && !k.match("^_")) { if (res_doc.hasOwnProperty(k) && !k.match("^_")) {
......
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