def get_shared_groups_by_repo(repo_id, org_id=None): if not org_id: group_ids = seafile_api.get_shared_group_ids_by_repo(repo_id) else: group_ids = seafile_api.org_get_shared_group_ids_by_repo( org_id, repo_id) if not group_ids: return [] groups = [] for group_id in group_ids: group = ccnet_api.get_group(int(group_id)) if group: groups.append(group) return groups
def get_shared_groups_by_repo(repo_id, org_id=None): if not org_id: group_ids = seafile_api.get_shared_group_ids_by_repo( repo_id) else: group_ids = seafile_api.org_get_shared_group_ids_by_repo(org_id, repo_id) if not group_ids: return [] groups = [] for group_id in group_ids: group = ccnet_api.get_group(int(group_id)) if group: groups.append(group) return groups