From 11b9fc37f50b9dce9f4355bad3bfefb9d20c6aa0 Mon Sep 17 00:00:00 2001 From: Ulysses Lara Date: Wed, 15 Jul 2020 13:26:31 -0300 Subject: [PATCH] Fix #3225 - Corrigindo bug em audiencia (#3226) --- sapl/audiencia/views.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sapl/audiencia/views.py b/sapl/audiencia/views.py index 67b9ea656..2ef1a334a 100755 --- a/sapl/audiencia/views.py +++ b/sapl/audiencia/views.py @@ -38,8 +38,11 @@ class AudienciaCrud(Crud): coluna_materia = row[3] # se mudar a ordem de listagem mudar aqui if coluna_materia[0]: materia = audiencia_materia[row[0][0]] - url_materia = reverse('sapl.materia:materialegislativa_detail', - kwargs={'pk': materia.id}) + if materia: + url_materia = reverse('sapl.materia:materialegislativa_detail', + kwargs={'pk': materia.id}) + else: + url_materia = None row[3] = (coluna_materia[0], url_materia) return context