From 9ed6e8742913d90835440ea3f3e9dc69fec2f6df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Justen=20=28=40turicas=29?= Date: Fri, 4 Sep 2020 21:03:12 -0300 Subject: [PATCH] =?UTF-8?q?Otimiza=20consulta=20de=20s=C3=B3cios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/views_special.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/views_special.py b/core/views_special.py index e8655640..1c72677c 100644 --- a/core/views_special.py +++ b/core/views_special.py @@ -80,7 +80,7 @@ def document_detail(request, document): doc_prefix = document[:8] branches = Empresa.objects.branches(document) - branches_cnpjs = branches.values_list("cnpj", flat=True) + branches_cnpjs = [company.cnpj for company in branches] else: # not a company # TODO: check another way of getting CPFs