diff --git a/sapl/protocoloadm/views.py b/sapl/protocoloadm/views.py index 87a1a3710..33bade736 100644 --- a/sapl/protocoloadm/views.py +++ b/sapl/protocoloadm/views.py @@ -403,6 +403,9 @@ class PesquisarDocumentoAdministrativoView(DocumentoAdministrativoMixin, qs = self.get_queryset() 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,