diff --git a/base/admin.py b/base/admin.py index c97c44834..e9caf1ca6 100644 --- a/base/admin.py +++ b/base/admin.py @@ -1,6 +1,7 @@ -from sapl.utils import register_all_models_in_admin from django.contrib import admin + from base.models import ProblemaMigracao +from sapl.utils import register_all_models_in_admin register_all_models_in_admin(__name__) diff --git a/base/models.py b/base/models.py index 9b4ddc80f..cff2a32f2 100644 --- a/base/models.py +++ b/base/models.py @@ -1,7 +1,8 @@ -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 django.db import models +from django.utils.translation import ugettext_lazy as _ + from sapl.utils import UF diff --git a/legacy/migration.py b/legacy/migration.py index 4ad6c2367..c4f4103d6 100644 --- a/legacy/migration.py +++ b/legacy/migration.py @@ -7,11 +7,10 @@ from django.apps.config import AppConfig from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from django.db import connections, models -from django.db.models import CharField, ForeignKey, TextField +from django.db.models import CharField, TextField from django.db.models.base import ModelBase - from model_mommy import mommy -from model_mommy.mommy import make, foreign_key_required +from model_mommy.mommy import foreign_key_required, make from base.models import ProblemaMigracao from comissoes.models import Composicao, Participacao @@ -448,7 +447,6 @@ def check_app_no_ind_excluido(app): def make_with_log(model, _quantity=None, make_m2m=False, **attrs): - all_fields = model._meta.get_fields() fields_dict = get_fields_dict(model) stub = make(model, _quantity, make_m2m, **fields_dict) problema = 'Um stub foi necessário durante a criação de um outro stub'