From ecd366ee85e4d59a94ab187cbf1d8052869a1dde Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Tue, 15 Aug 2017 11:26:05 -0300 Subject: [PATCH] =?UTF-8?q?Retirado=20c=C3=B3digo=20de=20debug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/legacy/migration.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sapl/legacy/migration.py b/sapl/legacy/migration.py index b0599bcce..6075dccee 100644 --- a/sapl/legacy/migration.py +++ b/sapl/legacy/migration.py @@ -18,7 +18,8 @@ from django.db.models.signals import post_delete, post_save from model_mommy import mommy from model_mommy.mommy import foreign_key_required, make -from sapl.base.models import Argumento, Autor, Constraint, ProblemaMigracao +from sapl.base.models import (Argumento, Autor, Constraint, ProblemaMigracao, + TipoAutor) from sapl.comissoes.models import Comissao, Composicao, Participacao from sapl.legacy.models import Protocolo as ProtocoloLegado from sapl.materia.models import (AcompanhamentoMateria, DocumentoAcessorio, @@ -441,12 +442,8 @@ class DataMigrator: self.data_mudada['problema'] = problema self.data_mudada.setdefault('nome_campo', []).\ append(field.name) - if field_type in ['CharField', 'TextField'] \ - and value in [None, 'None']: - if value == 'None': - # TODO quero saber como é que pode ser 'None' !!!! - import ipdb - ipdb.set_trace() + if (field_type in ['CharField', 'TextField'] + and value in [None, 'None']): value = '' setattr(new, field.name, value)