From 11ac60a2e3470431d02968c06b23baa0dabebdd0 Mon Sep 17 00:00:00 2001 From: Cesar Carvalho Date: Thu, 4 Jul 2019 15:08:03 -0300 Subject: [PATCH] =?UTF-8?q?HOT-FIX:=20Corrige=20problema=20na=20gera=C3=A7?= =?UTF-8?q?=C3=A3o=20de=20extrato=20da=20sess=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/base/templatetags/common_tags.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sapl/base/templatetags/common_tags.py b/sapl/base/templatetags/common_tags.py index 1e5a0c717..a9e47d827 100644 --- a/sapl/base/templatetags/common_tags.py +++ b/sapl/base/templatetags/common_tags.py @@ -301,12 +301,20 @@ def urldetail(obj): @register.filter def filiacao_data_filter(parlamentar, data_inicio): - return filiacao_data(parlamentar, data_inicio) + try: + filiacao = filiacao_data(parlamentar, data_inicio) + except Exception: + filiacao = '' + return filiacao @register.filter def filiacao_intervalo_filter(parlamentar, date_range): - return filiacao_data(parlamentar, date_range[0], date_range[1]) + try: + filiacao = filiacao_data(parlamentar, date_range[0], date_range[1]) + except Exception: + filiacao = '' + return filiacao @register.simple_tag