You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ch...@apache.org on 2015/10/12 21:26:57 UTC
[3/3] couch commit: updated refs/heads/add-filter-revs-limit to
6198f80
Whitespace and housekeeping
Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/6198f804
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/6198f804
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/6198f804
Branch: refs/heads/add-filter-revs-limit
Commit: 6198f804c8e175313b9a77f99bc2ccff34151cc9
Parents: a316f9b
Author: Russell Branca <ch...@apache.org>
Authored: Mon Oct 12 19:26:30 2015 +0000
Committer: Russell Branca <ch...@apache.org>
Committed: Mon Oct 12 19:26:30 2015 +0000
----------------------------------------------------------------------
src/couch_query_servers.erl | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/6198f804/src/couch_query_servers.erl
----------------------------------------------------------------------
diff --git a/src/couch_query_servers.erl b/src/couch_query_servers.erl
index cf3e18b..632cb5c 100644
--- a/src/couch_query_servers.erl
+++ b/src/couch_query_servers.erl
@@ -268,14 +268,13 @@ get_number(Key, Props) ->
validate_doc_update(DDoc, EditDoc, DiskDoc, Ctx, SecObj) ->
JsonEditDoc = couch_doc:to_json_obj(EditDoc, [revs]),
JsonDiskDoc = json_doc(DiskDoc),
- Resp = ddoc_prompt(DDoc,
- [<<"validate_doc_update">>],
- [JsonEditDoc, JsonDiskDoc, Ctx, SecObj]),
- case Resp of
- _ when Resp /= 1 ->
- couch_stats:increment_counter(
- [couchdb, query_server, vdu_rejects], 1);
- _ -> ok
+ Resp = ddoc_prompt(
+ DDoc,
+ [<<"validate_doc_update">>],
+ [JsonEditDoc, JsonDiskDoc, Ctx, SecObj]
+ ),
+ if Resp == 1 -> ok; true ->
+ couch_stats:increment_counter([couchdb, query_server, vdu_rejects], 1)
end,
case Resp of
1 ->