diff options
author | Azul <azul@riseup.net> | 2014-06-23 22:06:39 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2014-06-23 22:06:39 +0200 |
commit | 6a2f8b50a0374d467662d9c3325c7229468f607d (patch) | |
tree | f9d07fcd2b9a7843cf355d9fb6db0cda6cd65697 | |
parent | 630ae0d3a9e80c189f485b3e79fbbe0aecd21d7c (diff) |
update couch-doc-update to also filter _replication fields
we only need to keep id and rev to prevent conflicts
-rw-r--r-- | files/couch-doc-update | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/files/couch-doc-update b/files/couch-doc-update index fea6456..df216db 100644 --- a/files/couch-doc-update +++ b/files/couch-doc-update @@ -116,7 +116,7 @@ def get_document(db, doc_id) end def update_document(db, doc, data) - doc.reject! {|k,v| !k.start_with? '_'} + doc.reject! {|k,v| !["_id", "_rev"].include? k} doc.merge! data db.save_doc(doc) end |