summaryrefslogtreecommitdiff
path: root/src/fabric_view_reduce.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/fabric_view_reduce.erl')
-rw-r--r--src/fabric_view_reduce.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fabric_view_reduce.erl b/src/fabric_view_reduce.erl
index 73395d8c..9514bdef 100644
--- a/src/fabric_view_reduce.erl
+++ b/src/fabric_view_reduce.erl
@@ -4,8 +4,11 @@
-include("fabric.hrl").
-go(DbName, GroupId, VName, Args, Callback, Acc0) ->
+go(DbName, GroupId, View, Args, Callback, Acc0) when is_binary(GroupId) ->
{ok, DDoc} = fabric:open_doc(DbName, <<"_design/", GroupId/binary>>, []),
+ go(DbName, DDoc, View, Args, Callback, Acc0);
+
+go(DbName, DDoc, VName, Args, Callback, Acc0) ->
#group{def_lang=Lang, views=Views} = Group =
couch_view_group:design_doc_to_view_group(#db{name=DbName}, DDoc),
{NthRed, View} = fabric_view:extract_view(nil, VName, Views, reduce),