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/3eaed7b9 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/3eaed7b9 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/3eaed7b9 Branch: refs/heads/import Commit: 3eaed7b9eedde85f1f48da6628de63bf5846bcf6 Parents: e21aeb4 Author: Robert Newson <[email protected]> Authored: Fri Jan 25 14:18:53 2013 +0100 Committer: Paul J. Davis <[email protected]> Committed: Fri Jan 17 16:44:31 2014 -0800 ---------------------------------------------------------------------- src/couch_query_servers.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/3eaed7b9/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",
