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"]}
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']}