Browse Source

Exec migrate só depois de testar tag marco

pull/2023/head
Marcio Mazza 7 years ago
parent
commit
11384f4eba
  1. 2
      sapl/legacy/management/commands/migracao_25_31.py
  2. 2
      sapl/legacy/migracao.py

2
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)

2
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)

Loading…
Cancel
Save