diff --git a/sapl/base/forms.py b/sapl/base/forms.py index 7b34bce17..8114a0137 100644 --- a/sapl/base/forms.py +++ b/sapl/base/forms.py @@ -730,6 +730,11 @@ class RelatorioMateriasPorAutorFilterSet(django_filters.FilterSet): autoria__autor = django_filters.CharFilter(widget=forms.HiddenInput()) + @property + def qs(self): + parent = super(RelatorioMateriasPorAutorFilterSet, self).qs + return parent.distinct().order_by('-ano', '-numero') + class Meta: model = MateriaLegislativa fields = ['tipo', 'data_apresentacao']