Victor Fabre
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
2 deletions
-
sapl/base/forms.py
-
sapl/base/views.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__( |
|
|
|
|
|
@ -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 '' |
|
|
|
|
|
|
|