diff --git a/sapl/legacy/management/commands/migracao_25_31.py b/sapl/legacy/management/commands/migracao_25_31.py index 4541425c4..e3864ad0f 100644 --- a/sapl/legacy/management/commands/migracao_25_31.py +++ b/sapl/legacy/management/commands/migracao_25_31.py @@ -1,4 +1,3 @@ -from django.core import management from django.core.management.base import BaseCommand from sapl.legacy.migracao import migrar @@ -9,5 +8,4 @@ class Command(BaseCommand): help = 'Migração de dados do SAPL 2.5 para o SAPL 3.1' def handle(self, *args, **options): - management.call_command('migrate') migrar(interativo=False) diff --git a/sapl/legacy/migracao.py b/sapl/legacy/migracao.py index ffd0d2a18..c2d863b36 100644 --- a/sapl/legacy/migracao.py +++ b/sapl/legacy/migracao.py @@ -2,6 +2,7 @@ import subprocess from getpass import getpass import requests +from django.core import management from unipath import Path from sapl.legacy.migracao_dados import (REPO, TAG_MARCO, gravar_marco, info, @@ -24,6 +25,7 @@ def migrar(interativo=False): assert TAG_ZOPE in REPO.tags, adornar_msg( 'Antes de migrar ' 'é necessário fazer a exportação de documentos do zope') + management.call_command('migrate') migrar_dados(interativo=interativo) migrar_usuarios(REPO.working_dir) migrar_documentos(REPO)