summaryrefslogtreecommitdiff
path: root/src/fabric_group_info.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/fabric_group_info.erl')
-rw-r--r--src/fabric_group_info.erl7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fabric_group_info.erl b/src/fabric_group_info.erl
index 42c29838..d2b76674 100644
--- a/src/fabric_group_info.erl
+++ b/src/fabric_group_info.erl
@@ -4,8 +4,11 @@
-include("fabric.hrl").
-go(DbName, GroupId) ->
- {ok, DDoc} = fabric:open_doc(DbName, <<"_design/", GroupId/binary>>, []),
+go(DbName, GroupId) when is_binary(GroupId) ->
+ {ok, DDoc} = fabric:open_doc(DbName, GroupId, []),
+ go(DbName, DDoc);
+
+go(DbName, #doc{} = DDoc) ->
Group = couch_view_group:design_doc_to_view_group(#db{name=DbName}, DDoc),
Shards = partitions:all_parts(DbName),
Workers = fabric_util:submit_jobs(Shards, group_info, [Group]),