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'))