summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Newson <rnewson@apache.org>2018-07-17 13:10:02 +0100
committerRobert Newson <rnewson@apache.org>2018-07-17 13:35:42 +0100
commit726208e5e8a2b59dbc97e3f6503d8938364df57f (patch)
tree99d047642d06c339be0d9992e922472ef4bf851c
parentbbd263fb0c9d024f49e5bad475390c18b103a8eb (diff)
downloadcouchdb-726208e5e8a2b59dbc97e3f6503d8938364df57f.tar.gz
Prohibit include_docs=true for partitioned views
-rw-r--r--src/couch_mrview/src/couch_mrview_util.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/couch_mrview/src/couch_mrview_util.erl b/src/couch_mrview/src/couch_mrview_util.erl
index e50ab773e..9f11a8963 100644
--- a/src/couch_mrview/src/couch_mrview_util.erl
+++ b/src/couch_mrview/src/couch_mrview_util.erl
@@ -535,9 +535,10 @@ validate_args(Args) ->
_ -> mrverror(<<"Invalid value for `inclusive_end`.">>)
end,
- case {Args#mrargs.view_type, Args#mrargs.include_docs} of
- {red, true} -> mrverror(<<"`include_docs` is invalid for reduce">>);
- {_, ID} when is_boolean(ID) -> ok;
+ case {Args#mrargs.partitioned, Args#mrargs.view_type, Args#mrargs.include_docs} of
+ {true, _, true} -> mrverror(<<"`include_docs` is invalid for partitioned views">>);
+ {_, red, true} -> mrverror(<<"`include_docs` is invalid for reduce">>);
+ {_, _, ID} when is_boolean(ID) -> ok;
_ -> mrverror(<<"Invalid value for `include_docs`">>)
end,