Browse Source

Fixes #1221 (#1226)

pull/1227/head
Edward 8 years ago
committed by GitHub
parent
commit
cf3466dbf5
  1. 21
      sapl/materia/migrations/0008_auto_20170622_1527.py
  2. 2
      sapl/materia/models.py

21
sapl/materia/migrations/0008_auto_20170622_1527.py

@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.11 on 2017-06-22 15:27
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('materia', '0007_auto_20170620_1252'),
]
operations = [
migrations.AlterField(
model_name='acompanhamentomateria',
name='materia',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='materia.MateriaLegislativa'),
),
]

2
sapl/materia/models.py

@ -303,7 +303,7 @@ class Autoria(models.Model):
@reversion.register()
class AcompanhamentoMateria(models.Model):
usuario = models.CharField(max_length=50)
materia = models.ForeignKey(MateriaLegislativa, on_delete=models.PROTECT)
materia = models.ForeignKey(MateriaLegislativa)
email = models.EmailField(
max_length=100, verbose_name=_('E-mail'))
data_cadastro = models.DateField(auto_now_add=True)

Loading…
Cancel
Save