Browse Source

Conserta a ordem das tramitacoes

pull/663/head
Eduardo Calil 8 years ago
parent
commit
1891ac1a02
  1. 2
      sapl/materia/views.py
  2. 2
      sapl/protocoloadm/views.py

2
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()

2
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()

Loading…
Cancel
Save