diff --git a/sapl/materia/views.py b/sapl/materia/views.py index bd58c940b..a80899858 100644 --- a/sapl/materia/views.py +++ b/sapl/materia/views.py @@ -686,7 +686,7 @@ class TramitacaoCrud(MasterDetailCrud): def get_queryset(self): qs = super(MasterDetailCrud.ListView, self).get_queryset() kwargs = {self.crud.parent_field: self.kwargs['pk']} - return qs.filter(**kwargs).order_by('-data_tramitacao') + return qs.filter(**kwargs).order_by('-data_tramitacao', '-id') class DeleteView(PermissionRequiredMixin, MasterDetailCrud.DeleteView): permission_required = permissoes_materia() diff --git a/sapl/protocoloadm/views.py b/sapl/protocoloadm/views.py index c24beb6c4..1732efb9c 100644 --- a/sapl/protocoloadm/views.py +++ b/sapl/protocoloadm/views.py @@ -620,7 +620,7 @@ class TramitacaoAdmCrud(MasterDetailCrud): def get_queryset(self): qs = super(MasterDetailCrud.ListView, self).get_queryset() kwargs = {self.crud.parent_field: self.kwargs['pk']} - return qs.filter(**kwargs).order_by('-id') + return qs.filter(**kwargs).order_by('-data_tramitacao', '-id') def has_permission(self): app_config = AppConfig.objects.last()