diff options
author | John Christopher Anderson <jchris@apache.org> | 2008-10-21 20:06:37 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2008-10-21 20:06:37 +0000 |
commit | 7b27c98889ec0acfcaa3b798b1879e7749407a55 (patch) | |
tree | 3054e8f4851b3d79bffc5a311011379c82ea8c4f /src/couchdb | |
parent | 9866203c3c0bff9cd972df09624e5647cfc4e9be (diff) |
fix for COUCHDB-139 keys available when reduce=false
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@706744 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb')
-rw-r--r-- | src/couchdb/couch_httpd_view.erl | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/couchdb/couch_httpd_view.erl b/src/couchdb/couch_httpd_view.erl index 6f6ff706..c3ac07e3 100644 --- a/src/couchdb/couch_httpd_view.erl +++ b/src/couchdb/couch_httpd_view.erl @@ -346,9 +346,15 @@ parse_view_query(Req, Keys, IsReduce) -> exact -> QueryArgs; _ -> - Msg = lists:flatten(io_lib:format( - "Multi-key fetches for a reduce view must include group=true", [])), - throw({query_parse_error, Msg}) + #view_query_args{reduce=OptReduce} = QueryArgs, + case OptReduce of + true -> + Msg = lists:flatten(io_lib:format( + "Multi-key fetches for a reduce view must include group=true", [])), + throw({query_parse_error, Msg}); + _ -> + QueryArgs + end end end end. |