diff --git a/base/admin.py b/base/admin.py index e9caf1ca6..0d8e82faf 100644 --- a/base/admin.py +++ b/base/admin.py @@ -2,6 +2,8 @@ from django.contrib import admin from base.models import ProblemaMigracao from sapl.utils import register_all_models_in_admin +from django.contrib import admin +from base.models import ProblemaMigracao register_all_models_in_admin(__name__) diff --git a/base/models.py b/base/models.py index cff2a32f2..8af741c0d 100644 --- a/base/models.py +++ b/base/models.py @@ -2,7 +2,8 @@ from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.translation import ugettext_lazy as _ - +from django.contrib.contenttypes.fields import GenericForeignKey +from django.contrib.contenttypes.models import ContentType from sapl.utils import UF diff --git a/legacy/migration.py b/legacy/migration.py index c4f4103d6..f1210d363 100644 --- a/legacy/migration.py +++ b/legacy/migration.py @@ -107,8 +107,6 @@ def get_fk_related(field, value, label=None): field.name, value, field.model.__name__, label or '---') if value == 0: - # se FK == 0, criamos um stub e colocamos o valor '????????' - # para qualquer CharField ou TextField que possa haver if not field.null: fields_dict = get_fields_dict(field.related_model) value = mommy.make(field.related_model,