From 866e2b4535c12c3bad878b8e7ed6025375d3f3fb Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Sat, 1 Sep 2018 14:59:40 -0300 Subject: [PATCH] Edita ajustes apenas se houver deps a ressucitar --- sapl/legacy/scripts/ressucita_dependencias.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sapl/legacy/scripts/ressucita_dependencias.py b/sapl/legacy/scripts/ressucita_dependencias.py index 8037f23ee..5653a9ada 100644 --- a/sapl/legacy/scripts/ressucita_dependencias.py +++ b/sapl/legacy/scripts/ressucita_dependencias.py @@ -334,7 +334,8 @@ def get_slug(): def adiciona_ressucitar(): - arq_ajustes_pre_migracao = get_arquivo_ajustes_pre_migracao() - conteudo = arq_ajustes_pre_migracao.read_file() sqls = get_ressucitar(get_slug()) - arq_ajustes_pre_migracao.write_file('{}\n{}'.format(conteudo, sqls)) + if sqls.strip(): + arq_ajustes_pre_migracao = get_arquivo_ajustes_pre_migracao() + conteudo = arq_ajustes_pre_migracao.read_file() + arq_ajustes_pre_migracao.write_file('{}\n{}'.format(conteudo, sqls))