diff --git a/sapl/materia/migrations/0026_auto_20180302_1411.py b/sapl/materia/migrations/0026_auto_20180302_1411.py new file mode 100644 index 000000000..9d401710e --- /dev/null +++ b/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'), + ), + ] diff --git a/sapl/materia/models.py b/sapl/materia/models.py index 51fbcb855..ab4b3d074 100644 --- a/sapl/materia/models.py +++ b/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()