From 5d7bdd5a5500cacf41fb019dbbd2cb5cf8a42be3 Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Sat, 16 Jun 2018 15:36:53 -0300 Subject: [PATCH] Ajusta refs a XSLT ao migrar SDE --- sapl/legacy/migracao.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sapl/legacy/migracao.py b/sapl/legacy/migracao.py index 9ed09360f..dd54a103e 100644 --- a/sapl/legacy/migracao.py +++ b/sapl/legacy/migracao.py @@ -51,6 +51,9 @@ def salva_conteudo_do_sde(proposicao, conteudo): proposicao, 'proposicao_sde_{}.xml'.format(proposicao.pk)) caminho_absoluto = Path(REPO.working_dir, caminho_relativo) caminho_absoluto.parent.mkdir(parents=True) + # ajusta caminhos para folhas de estilo + conteudo = conteudo.replace(b'"XSLT/HTML', b'"/XSLT/HTML') + conteudo = conteudo.replace(b"'XSLT/HTML", b"'/XSLT/HTML") with open(caminho_absoluto, 'wb') as arq: arq.write(conteudo) proposicao.texto_original = caminho_relativo