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/02/05 00:06:30 UTC

[17/50] couch commit: updated refs/heads/import to c3116d7

Fix new _stats with added 'working properly' feature


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

Branch: refs/heads/import
Commit: 4b7044a0c0aee6f304c5a8c4e00a197bd0ba7c77
Parents: c3bc116
Author: Robert Newson <ro...@cloudant.com>
Authored: Fri Jan 25 14:18:53 2013 +0100
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Tue Feb 4 17:03:24 2014 -0600

----------------------------------------------------------------------
 src/couch_query_servers.erl | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/4b7044a0/src/couch_query_servers.erl
----------------------------------------------------------------------
diff --git a/src/couch_query_servers.erl b/src/couch_query_servers.erl
index 679d815..88ab30a 100644
--- a/src/couch_query_servers.erl
+++ b/src/couch_query_servers.erl
@@ -307,9 +307,11 @@ get_number(Key, Props) ->
     case couch_util:get_value(Key, Props) of
     X when is_number(X) ->
         X;
+    undefined when is_binary(Key) ->
+        get_number(binary_to_atom(Key, latin1), Props);
     undefined ->
-        Msg = io_lib:format("user _stats input missing required field ~s",
-            [Key]),
+        Msg = io_lib:format("user _stats input missing required field ~s (~p)",
+            [Key, Props]),
         throw({invalid_value, iolist_to_binary(Msg)});
     Else ->
         Msg = io_lib:format("non-numeric _stats input received for ~s: ~w",