From 18ee4d583e96fe4f62ae577b86edee84398d3b78 Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Wed, 2 Aug 2017 14:29:06 -0300 Subject: [PATCH] HOT-FIX: tira obrigatoriedade do codigo de casa legislativa --- .../migrations/0005_auto_20170802_1428.py | 20 +++++++++++++++++++ sapl/base/models.py | 5 ++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 sapl/base/migrations/0005_auto_20170802_1428.py diff --git a/sapl/base/migrations/0005_auto_20170802_1428.py b/sapl/base/migrations/0005_auto_20170802_1428.py new file mode 100644 index 000000000..d97c0448b --- /dev/null +++ b/sapl/base/migrations/0005_auto_20170802_1428.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.11 on 2017-08-02 14:28 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('base', '0004_auto_20170714_1838'), + ] + + operations = [ + migrations.AlterField( + model_name='casalegislativa', + name='codigo', + field=models.CharField(blank=True, max_length=100, null=True, verbose_name='Codigo'), + ), + ] diff --git a/sapl/base/models.py b/sapl/base/models.py index f2f81ab15..eadd8e793 100644 --- a/sapl/base/models.py +++ b/sapl/base/models.py @@ -18,7 +18,10 @@ class CasaLegislativa(models.Model): # TODO ajustar todos os max_length !!!! # cod_casa => id (pk) - codigo = models.CharField(max_length=100, verbose_name=_('Codigo')) + codigo = models.CharField(max_length=100, + blank=True, + null=True, + verbose_name=_('Codigo')) nome = models.CharField(max_length=100, verbose_name=_('Nome')) sigla = models.CharField(max_length=100, verbose_name=_('Sigla')) endereco = models.CharField(max_length=100, verbose_name=_('Endereço'))