From d3e50a7574a50fe62ec7a040c4f74a8d0b73172a Mon Sep 17 00:00:00 2001 From: Victor Fabre Date: Mon, 11 Jun 2018 18:04:29 -0300 Subject: [PATCH] Fix #1992 (#1993) --- sapl/base/forms.py | 3 ++- sapl/base/views.py | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sapl/base/forms.py b/sapl/base/forms.py index 5410ee3fe..7b34bce17 100644 --- a/sapl/base/forms.py +++ b/sapl/base/forms.py @@ -528,7 +528,8 @@ class RelatorioAtasFilterSet(django_filters.FilterSet): @property def qs(self): parent = super(RelatorioAtasFilterSet, self).qs - return parent.distinct().prefetch_related('tipo').order_by('-ano', 'tipo', 'numero') + return parent.distinct().prefetch_related('tipo').exclude( + upload_ata='').order_by('-legislatura', 'tipo', 'numero') def __init__(self, *args, **kwargs): super(RelatorioAtasFilterSet, self).__init__( diff --git a/sapl/base/views.py b/sapl/base/views.py index f0e7d2e1b..238252245 100644 --- a/sapl/base/views.py +++ b/sapl/base/views.py @@ -247,7 +247,6 @@ class RelatorioAtasView(FilterView): if not self.filterset.form.is_valid(): return context - context['object_list'] = context['object_list'].exclude(upload_ata='') qr = self.request.GET.copy() context['filter_url'] = ('&' + qr.urlencode()) if len(qr) > 0 else ''