From 4b685efa9c1758bdf7ebff5052afd9c77e10c1cf Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Wed, 19 Dec 2018 14:55:29 -0200 Subject: [PATCH] Corrige exportacao de docs com sapl_documentos na raiz --- sapl/legacy/scripts/exporta_zope/exporta_zope.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sapl/legacy/scripts/exporta_zope/exporta_zope.py b/sapl/legacy/scripts/exporta_zope/exporta_zope.py index bec8595cf..4ddb1ea85 100755 --- a/sapl/legacy/scripts/exporta_zope/exporta_zope.py +++ b/sapl/legacy/scripts/exporta_zope/exporta_zope.py @@ -395,16 +395,17 @@ def _dump_sapl(data_fs_path, documentos_fs_path, destino, salvar, mtimes): try: sapl = find_sapl(app) - if sapl == {'id': 'sapl'}: + if ('sapl_documentos' in app and + type(app['sapl_documentos']).__name__ == 'Folder'): # em algumas instalações sapl_documentos está direto na raiz docs = br(app['sapl_documentos']) else: # caso mais comum docs = br(sapl['sapl_documentos']) - # extrai folhas XSLT (segunda tentativa) - if 'XSLT' in sapl: - dump_folder(br(sapl['XSLT']), destino, salvar, mtimes) + # extrai folhas XSLT (segunda tentativa) + if 'XSLT' in sapl: + dump_folder(br(sapl['XSLT']), destino, salvar, mtimes) # extrai documentos with logando_nao_identificados():