You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/01/17 23:07:13 UTC

[39/50] git commit: Don't add undefined stats to body

Don't add undefined stats to body


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/commit/3160f54f
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/tree/3160f54f
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/diff/3160f54f

Branch: refs/heads/import
Commit: 3160f54f56f454c23c78e6a45c5404728b888d60
Parents: d17aced
Author: Robert Newson <ro...@cloudant.com>
Authored: Sun Mar 3 10:19:32 2013 +0000
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Wed Mar 20 06:02:41 2013 -0500

----------------------------------------------------------------------
 src/couch_replicator_manager.erl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-replicator/blob/3160f54f/src/couch_replicator_manager.erl
----------------------------------------------------------------------
diff --git a/src/couch_replicator_manager.erl b/src/couch_replicator_manager.erl
index 1db7929..93f0e89 100644
--- a/src/couch_replicator_manager.erl
+++ b/src/couch_replicator_manager.erl
@@ -575,7 +575,9 @@ update_rep_doc(RepDbName, RepDocId, KVs) when is_binary(RepDocId) ->
 
 update_rep_doc(RepDbName, #doc{body = {RepDocBody}} = RepDoc, KVs) ->
     NewRepDocBody = lists:foldl(
-        fun({<<"_replication_state">> = K, State} = KV, Body) ->
+        fun({K, undefined}, Body) ->
+                lists:keydelete(K, 1, Body);
+           ({<<"_replication_state">> = K, State} = KV, Body) ->
                 case get_value(K, Body) of
                 State ->
                     Body;