From 9b26d33a322f3b4742b9fbfd24ad6abc093d61da Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Tue, 14 Nov 2017 11:26:13 -0200 Subject: [PATCH] Especifica melhor o objeto sapl dentro do zodb --- sapl/legacy/scripts/exporta_zope/exporta_zope.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sapl/legacy/scripts/exporta_zope/exporta_zope.py b/sapl/legacy/scripts/exporta_zope/exporta_zope.py index 1a39247bb..9d43ce4f2 100644 --- a/sapl/legacy/scripts/exporta_zope/exporta_zope.py +++ b/sapl/legacy/scripts/exporta_zope/exporta_zope.py @@ -126,12 +126,13 @@ def get_app(data_fs_path): def find_sapl(app): - [id] = [e['id'] for e in app['_objects'] - if e['id'].startswith('cm_') - and e['meta_type'] == 'Folder'] - cm_zzz = br(app[id]) - sapl = br(cm_zzz['sapl']) - return sapl + for obj in app['_objects']: + id, meta_type = obj['id'], obj['meta_type'] + if id.startswith('cm_') and meta_type == 'Folder': + cm_zzz = br(app[id]) + sapl = br(cm_zzz.get('sapl', None)) + if sapl and 'sapl_documentos' in sapl and 'acl_users' in sapl: + return sapl def dump_sapl(data_fs_path):