From eb81706371722e197f74d07108884f37da8b3025 Mon Sep 17 00:00:00 2001 From: Edward Oliveira Date: Thu, 20 Oct 2022 10:33:53 -0300 Subject: [PATCH] HOT-FIX: Fixes #3617 --- .../migrations/0029_auto_20221019_2041.py | 17 +++++++++++++++++ sapl/comissoes/models.py | 2 +- sapl/comissoes/views.py | 1 - 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 sapl/comissoes/migrations/0029_auto_20221019_2041.py diff --git a/sapl/comissoes/migrations/0029_auto_20221019_2041.py b/sapl/comissoes/migrations/0029_auto_20221019_2041.py new file mode 100644 index 000000000..abd175497 --- /dev/null +++ b/sapl/comissoes/migrations/0029_auto_20221019_2041.py @@ -0,0 +1,17 @@ +# Generated by Django 2.2.28 on 2022-10-19 23:41 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('comissoes', '0028_auto_20220807_2257'), + ] + + operations = [ + migrations.AlterModelOptions( + name='reuniao', + options={'ordering': ('-data', '-nome'), 'verbose_name': 'Reunião de Comissão', 'verbose_name_plural': 'Reuniões de Comissão'}, + ), + ] diff --git a/sapl/comissoes/models.py b/sapl/comissoes/models.py index 5c6a67d8a..75381e3a2 100644 --- a/sapl/comissoes/models.py +++ b/sapl/comissoes/models.py @@ -258,7 +258,7 @@ class Reuniao(models.Model): class Meta: verbose_name = _('Reunião de Comissão') verbose_name_plural = _('Reuniões de Comissão') - ordering = ('numero', 'comissao') + ordering = ('-data', '-nome') def __str__(self): return self.nome diff --git a/sapl/comissoes/views.py b/sapl/comissoes/views.py index 0c9329f05..5d3e450c2 100644 --- a/sapl/comissoes/views.py +++ b/sapl/comissoes/views.py @@ -212,7 +212,6 @@ class ReuniaoCrud(MasterDetailCrud): class BaseMixin(MasterDetailCrud.BaseMixin): list_field_names = ['data', 'nome', 'tema', 'upload_ata'] - ordering = '-data' class DetailView(MasterDetailCrud.DetailView): template_name = "comissoes/reuniao_detail.html"