def _get_groups(company):
    data = {"identificador": company.document}
    serializer = CNPJCompanyGroupsSerializer(data=data)
    serializer.is_valid()
    network = serializer.data["network"]
    return {"nodes": network["nodes"], "links": network["links"]}
示例#2
0
def _get_groups(company):
    data = {'identificador': company.document}
    serializer = CNPJCompanyGroupsSerializer(data=data)
    serializer.is_valid()
    network = serializer.data['network']
    return {'nodes': network['nodes'], 'links': network['links']}