From 04ad173554cd84e611374020b5bf64a908823cba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Rodrigues?= Date: Fri, 20 Dec 2019 14:54:47 -0300 Subject: [PATCH] HOT-FIX: exclusao de mat ref em pauta reuniao #3069 --- .../migrations/0063_auto_20191220_1351.py | 21 +++++++++++++++++++ sapl/materia/models.py | 1 + 2 files changed, 22 insertions(+) create mode 100644 sapl/materia/migrations/0063_auto_20191220_1351.py 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') )