From f2198a9752aae60add28c40c83d05a6464d099ac Mon Sep 17 00:00:00 2001 From: Felipe Vieira Date: Fri, 3 Feb 2012 12:59:54 +0000 Subject: [PATCH] removendo None ao imprimir presidente --- sigi/apps/casas/reports.py | 2 ++ sigi/apps/casas/templates/casas/carrinho.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sigi/apps/casas/reports.py b/sigi/apps/casas/reports.py index de6dc33..cb90109 100644 --- a/sigi/apps/casas/reports.py +++ b/sigi/apps/casas/reports.py @@ -80,6 +80,8 @@ class CasasLegislativasLabels(Report): ObjectValue( attribute_name='presidente', top=1.5*cm, left=0.5*cm, width=9.4*cm, + get_value=lambda instance: + instance.presidente or "" ), ObjectValue( attribute_name='tipo', diff --git a/sigi/apps/casas/templates/casas/carrinho.html b/sigi/apps/casas/templates/casas/carrinho.html index 690818e..9774a6f 100644 --- a/sigi/apps/casas/templates/casas/carrinho.html +++ b/sigi/apps/casas/templates/casas/carrinho.html @@ -45,7 +45,7 @@ {% endif %} {{casa.nome}} {{casa.municipio}} - {{casa.presidente}} + {{casa.presidente|default_if_none:""}} {{casa.logradouro}} {% endfor %}