diff --git a/sapl/materia/migrations/0063_auto_20191220_1351.py b/sapl/materia/migrations/0063_auto_20191220_1351.py new file mode 100644 index 000000000..77194a87c --- /dev/null +++ b/sapl/materia/migrations/0063_auto_20191220_1351.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.20 on 2019-12-20 16:51 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('materia', '0062_merge_20191209_1531'), + ] + + operations = [ + migrations.AlterField( + model_name='pautareuniao', + name='materia', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='materia_set', to='materia.MateriaLegislativa', verbose_name='Matéria'), + ), + ] diff --git a/sapl/materia/models.py b/sapl/materia/models.py index c373d98d6..b3fff4851 100644 --- a/sapl/materia/models.py +++ b/sapl/materia/models.py @@ -433,6 +433,7 @@ class PautaReuniao(models.Model): ) materia = models.ForeignKey( MateriaLegislativa, related_name='materia_set', + on_delete=models.PROTECT, verbose_name=_('Matéria') )