Browse Source

Fix #1992 (#1993)

pull/2007/head
Victor Fabre 7 years ago
committed by GitHub
parent
commit
d3e50a7574
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      sapl/base/forms.py
  2. 1
      sapl/base/views.py

3
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__(

1
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 ''

Loading…
Cancel
Save