From 613a45af6c9349295c4e7eb0535b2ea77ab984e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ses=C3=B3stris=20Vieira?= Date: Wed, 14 Aug 2013 12:55:55 -0300 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=A3o=20de=20bug=20na=20gera=C3=A7?= =?UTF-8?q?=C3=A3o=20de=20CSV=20de=20Casas=20Legislativas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sigi/apps/casas/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sigi/apps/casas/views.py b/sigi/apps/casas/views.py index 17a53c0..d900f91 100644 --- a/sigi/apps/casas/views.py +++ b/sigi/apps/casas/views.py @@ -355,17 +355,17 @@ def export_csv(request): elif u"Última alteração de endereco" == atributo: lista.append(casa.ult_alt_endereco) elif u"Nome contato" == atributo: - if contatos: + if contatos and contatos[0].nome: lista.append(contatos[0].nome.encode("utf-8")) else: lista.append('') elif u"Cargo contato" == atributo: - if contatos: + if contatos and contatos[0].cargo: lista.append(contatos[0].cargo.encode("utf-8")) else: lista.append('') elif u"Email contato" == atributo: - if contatos: + if contatos and contatos[0].email: lista.append(contatos[0].email.encode("utf-8")) else: lista.append('')