From 1891ac1a0252a2531e36d48f1de080114626a494 Mon Sep 17 00:00:00 2001 From: Eduardo Calil Date: Wed, 28 Sep 2016 10:11:11 -0300 Subject: [PATCH] Conserta a ordem das tramitacoes --- sapl/materia/views.py | 2 +- sapl/protocoloadm/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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()