Browse Source

Muda campo status para poder aceitar valores nulos

Signed-off-by: Luciano Almeida <lucianoalmeida@interlegis.leg.br>
pull/1496/head
Luciano Almeida 8 years ago
parent
commit
b4a527ccf9
  1. 26
      sapl/materia/migrations/0012_auto_20170815_1238.py
  2. 4
      sapl/materia/models.py

26
sapl/materia/migrations/0012_auto_20170815_1238.py

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.12 on 2017-08-15 12:38
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('materia', '0011_auto_20170808_1034'),
]
operations = [
migrations.AlterField(
model_name='proposicao',
name='tipo',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='materia.TipoProposicao', verbose_name='Tipo'),
),
migrations.AlterField(
model_name='tramitacao',
name='status',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='materia.StatusTramitacao', verbose_name='Status'),
),
]

4
sapl/materia/models.py

@ -846,6 +846,10 @@ class Tramitacao(models.Model):
)
status = models.ForeignKey(StatusTramitacao, on_delete=models.PROTECT,
# TODO PÓS MIGRACAO INICIAL (vide #1381)
# não nulo quando todas as
# bases tiverem sido corrigidas
null=True,
verbose_name=_('Status'))
materia = models.ForeignKey(MateriaLegislativa, on_delete=models.PROTECT)
data_tramitacao = models.DateField(verbose_name=_('Data Tramitação'))

Loading…
Cancel
Save