From 6a2f8b50a0374d467662d9c3325c7229468f607d Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 23 Jun 2014 22:06:39 +0200 Subject: update couch-doc-update to also filter _replication fields we only need to keep id and rev to prevent conflicts --- files/couch-doc-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3