diff --git a/sapl/materia/migrations/0013_auto_20170816_1136.py b/sapl/materia/migrations/0013_auto_20170816_1136.py new file mode 100644 index 000000000..e6804e8e1 --- /dev/null +++ b/sapl/materia/migrations/0013_auto_20170816_1136.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.12 on 2017-08-16 11:36 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('materia', '0012_auto_20170815_1238'), + ] + + operations = [ + migrations.AlterField( + model_name='tramitacao', + name='unidade_tramitacao_destino', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='tramitacoes_destino', to='materia.UnidadeTramitacao', verbose_name='Unidade Destino'), + ), + ] diff --git a/sapl/materia/models.py b/sapl/materia/models.py index c1cabfe18..193b182da 100644 --- a/sapl/materia/models.py +++ b/sapl/materia/models.py @@ -862,6 +862,10 @@ class Tramitacao(models.Model): blank=True, null=True, verbose_name=_('Data Encaminhamento')) unidade_tramitacao_destino = models.ForeignKey( UnidadeTramitacao, + # TODO PÓS MIGRACAO INICIAL (vide #1381) + # não nulo quando todas as + # bases tiverem sido corrigidas + null=True, related_name='tramitacoes_destino', on_delete=models.PROTECT, verbose_name=_('Unidade Destino'))