Browse Source

Relaxa data_materia em materia.Numeracao

(devido à migração de dados)
pull/1751/merge
Marcio Mazza 7 years ago
parent
commit
0e859fae62
  1. 20
      sapl/materia/migrations/0026_auto_20180302_1411.py
  2. 4
      sapl/materia/models.py

20
sapl/materia/migrations/0026_auto_20180302_1411.py

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2018-03-02 17:11
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('materia', '0025_auto_20180221_1649'),
]
operations = [
migrations.AlterField(
model_name='numeracao',
name='data_materia',
field=models.DateField(null=True, verbose_name='Data'),
),
]

4
sapl/materia/models.py

@ -515,7 +515,7 @@ class Numeracao(models.Model):
verbose_name=_('Número'))
ano_materia = models.PositiveSmallIntegerField(verbose_name=_('Ano'),
choices=RANGE_ANOS)
data_materia = models.DateField(verbose_name=_('Data'))
data_materia = models.DateField(verbose_name=_('Data'), null=True)
class Meta:
verbose_name = _('Numeração')
@ -529,7 +529,7 @@ class Numeracao(models.Model):
def __str__(self):
return _('%(numero)s/%(ano)s') % {
'numero': self.numero_materia,
'ano': self.data_materia.year}
'ano': self.ano_materia}
@reversion.register()

Loading…
Cancel
Save