From c76136cb6d41b03d4b0fdeee0fcc47c00e23dcbf Mon Sep 17 00:00:00 2001 From: Edward Oliveira Date: Sat, 28 Oct 2023 14:39:14 -0700 Subject: [PATCH] =?UTF-8?q?Apaga=20Numera=C3=A7=C3=A3o=20se=20TipoMateriaL?= =?UTF-8?q?egislativa=20=C3=A9=20apagado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/0085_auto_20231028_1838.py | 19 +++++++++++++++++++ sapl/materia/models.py | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 sapl/materia/migrations/0085_auto_20231028_1838.py diff --git a/sapl/materia/migrations/0085_auto_20231028_1838.py b/sapl/materia/migrations/0085_auto_20231028_1838.py new file mode 100644 index 000000000..3531d7b7d --- /dev/null +++ b/sapl/materia/migrations/0085_auto_20231028_1838.py @@ -0,0 +1,19 @@ +# Generated by Django 2.2.28 on 2023-10-28 21:38 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('materia', '0084_auto_20231007_2149'), + ] + + operations = [ + migrations.AlterField( + model_name='numeracao', + name='tipo_materia', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='materia.TipoMateriaLegislativa', verbose_name='Tipo de Matéria'), + ), + ] diff --git a/sapl/materia/models.py b/sapl/materia/models.py index 4c4109354..f81758dcc 100644 --- a/sapl/materia/models.py +++ b/sapl/materia/models.py @@ -624,7 +624,7 @@ class Numeracao(models.Model): materia = models.ForeignKey(MateriaLegislativa, on_delete=models.CASCADE) tipo_materia = models.ForeignKey( TipoMateriaLegislativa, - on_delete=models.PROTECT, + on_delete=models.CASCADE, verbose_name=_('Tipo de Matéria')) numero_materia = models.CharField(max_length=5, verbose_name=_('Número'))