diff --git a/sapl/materia/migrations/0008_auto_20170622_1527.py b/sapl/materia/migrations/0008_auto_20170622_1527.py new file mode 100644 index 000000000..089d385c8 --- /dev/null +++ b/sapl/materia/migrations/0008_auto_20170622_1527.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.11 on 2017-06-22 15:27 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('materia', '0007_auto_20170620_1252'), + ] + + operations = [ + migrations.AlterField( + model_name='acompanhamentomateria', + name='materia', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='materia.MateriaLegislativa'), + ), + ] diff --git a/sapl/materia/models.py b/sapl/materia/models.py index f6d9ab619..ec17e1ded 100644 --- a/sapl/materia/models.py +++ b/sapl/materia/models.py @@ -303,7 +303,7 @@ class Autoria(models.Model): @reversion.register() class AcompanhamentoMateria(models.Model): usuario = models.CharField(max_length=50) - materia = models.ForeignKey(MateriaLegislativa, on_delete=models.PROTECT) + materia = models.ForeignKey(MateriaLegislativa) email = models.EmailField( max_length=100, verbose_name=_('E-mail')) data_cadastro = models.DateField(auto_now_add=True)