From 68bb0596018942ebc8d0114b1cd5a38c5e365ced Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Tue, 17 Apr 2018 12:10:13 -0300 Subject: [PATCH] =?UTF-8?q?HOT-FIX:=20apaga=20ordem=20dia=20e=20expediente?= =?UTF-8?q?=20ao=20apagar=20sess=C3=A3o=20plen=C3=A1ria?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/0021_auto_20180417_1209.py | 26 +++++++++++++++++++ sapl/sessao/models.py | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 sapl/sessao/migrations/0021_auto_20180417_1209.py 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'))