From 6459c783698b9cc0ec6126527bbd5215817bd378 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Tue, 25 Apr 2017 17:26:32 -0300 Subject: [PATCH] Closes #1033 --- sapl/sessao/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sapl/sessao/views.py b/sapl/sessao/views.py index 4367ec84d..02efb83d0 100644 --- a/sapl/sessao/views.py +++ b/sapl/sessao/views.py @@ -164,7 +164,9 @@ class MateriaOrdemDiaCrud(MasterDetailCrud): def get_rows(self, object_list): for obj in object_list: - exist_resultado = obj.registrovotacao_set.all().exists() + exist_resultado = obj.registrovotacao_set.filter( + materia=obj.materia + ).exists() if not exist_resultado: if obj.votacao_aberta: url = ''