diff --git a/sapl/protocoloadm/views.py b/sapl/protocoloadm/views.py index 33bade736..3c9f592dd 100644 --- a/sapl/protocoloadm/views.py +++ b/sapl/protocoloadm/views.py @@ -92,6 +92,9 @@ class ProtocoloPesquisaView(PermissionRequiredMixin, FilterView): qs = self.get_queryset().order_by('ano', 'numero') qs = qs.distinct() + + if 'o' in self.request.GET and not self.request.GET['o']: + qs = qs.order_by('-ano', '-numero') kwargs.update({ 'queryset': qs,