From d351e7c7bb5aa565fc4352f649854e10253f2a9e Mon Sep 17 00:00:00 2001 From: Eduardo Calil Date: Tue, 8 Aug 2017 19:01:45 -0300 Subject: [PATCH] =?UTF-8?q?Conserta=20a=20query=20de=20Relat=C3=B3rio=20so?= =?UTF-8?q?bre=20Presen=C3=A7a=20em=20Sess=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/base/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sapl/base/views.py b/sapl/base/views.py index 4c86ff515..718774d46 100644 --- a/sapl/base/views.py +++ b/sapl/base/views.py @@ -21,7 +21,7 @@ from sapl.base.models import Autor, TipoAutor from sapl.crud.base import CrudAux from sapl.materia.models import MateriaLegislativa, TipoMateriaLegislativa from sapl.parlamentares.models import Parlamentar -from sapl.sessao.models import OrdemDia, SessaoPlenaria +from sapl.sessao.models import PresencaOrdemDia, SessaoPlenaria from sapl.utils import sapl_logger from .forms import (CasaLegislativaForm, ConfiguracoesAppForm, @@ -253,9 +253,9 @@ class RelatorioPresencaSessaoView(FilterView): sessao_count=0, ordemdia_count=0) - total_ordemdia = OrdemDia.objects.order_by( - 'sessao_plenaria').filter(**param0).distinct( - 'sessao_plenaria').count() + total_ordemdia = PresencaOrdemDia.objects.filter( + **param0).distinct('sessao_plenaria__id').order_by( + 'sessao_plenaria__id').count() self.calcular_porcentagem_presenca( pls,