From e2b4cd12f025990885d595d71da07e51cdb70423 Mon Sep 17 00:00:00 2001 From: Felipe Vieira Date: Fri, 3 Feb 2012 12:41:38 +0000 Subject: [PATCH] =?UTF-8?q?Caso=20n=C3=A3o=20tenha=20presidente=20n=C3=A3o?= =?UTF-8?q?=20imprime=20None?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sigi/apps/casas/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sigi/apps/casas/views.py b/sigi/apps/casas/views.py index 4a1978d..15e03ff 100644 --- a/sigi/apps/casas/views.py +++ b/sigi/apps/casas/views.py @@ -273,7 +273,8 @@ def export_csv(request): elif u"MunicĂ­pio" == atributo: lista.append(str(casa.municipio)) elif u"Presidente" == atributo: - lista.append(str(casa.presidente).encode("utf-8")) + if casa.presidente: + lista.append(str(casa.presidente).encode("utf-8")) elif u"Logradouro" == atributo: lista.append(casa.logradouro.encode("utf-8")) elif u"Bairro" == atributo: