diff --git a/sapl/base/forms.py b/sapl/base/forms.py index 11d93a13f..259fe8950 100644 --- a/sapl/base/forms.py +++ b/sapl/base/forms.py @@ -505,6 +505,11 @@ class RelatorioHistoricoTramitacaoFilterSet(django_filters.FilterSet): 'widget': RangeWidgetOverride} }} + @property + def qs(self): + parent = super(RelatorioHistoricoTramitacaoFilterSet, self).qs + return parent.distinct().order_by('-ano', 'tipo', 'numero') + class Meta: model = MateriaLegislativa fields = ['tipo', 'tramitacao__unidade_tramitacao_local',