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 %}