diff --git a/sapl/sessao/migrations/0021_auto_20180417_1209.py b/sapl/sessao/migrations/0021_auto_20180417_1209.py new file mode 100644 index 000000000..51993cfdc --- /dev/null +++ b/sapl/sessao/migrations/0021_auto_20180417_1209.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.11 on 2018-04-17 15:09 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('sessao', '0020_auto_20180416_1424'), + ] + + operations = [ + migrations.AlterField( + model_name='expedientemateria', + name='sessao_plenaria', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sessao.SessaoPlenaria'), + ), + migrations.AlterField( + model_name='ordemdia', + name='sessao_plenaria', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sessao.SessaoPlenaria'), + ), + ] diff --git a/sapl/sessao/models.py b/sapl/sessao/models.py index c10d3e03d..13e55aea7 100644 --- a/sapl/sessao/models.py +++ b/sapl/sessao/models.py @@ -231,7 +231,7 @@ class AbstractOrdemDia(models.Model): ) sessao_plenaria = models.ForeignKey(SessaoPlenaria, - on_delete=models.PROTECT) + on_delete=models.CASCADE) materia = models.ForeignKey(MateriaLegislativa, on_delete=models.PROTECT, verbose_name=_('Matéria'))