From 93b531ad2b80b85bca31d6af2de0c8dbb80c81c8 Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Tue, 22 May 2018 19:10:49 -0300 Subject: [PATCH 1/2] Corrige contagem de btree na exportacao de docs --- sapl/legacy/scripts/exporta_zope/exporta_zope.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sapl/legacy/scripts/exporta_zope/exporta_zope.py b/sapl/legacy/scripts/exporta_zope/exporta_zope.py index 63d0ed09e..749a521b1 100755 --- a/sapl/legacy/scripts/exporta_zope/exporta_zope.py +++ b/sapl/legacy/scripts/exporta_zope/exporta_zope.py @@ -151,13 +151,14 @@ enumerate_properties = partial(enumerate_by_key_list, def enumerate_btree(folder): contagem_esperada = folder['_count'].value tree = folder['_tree'] + contagem_real = 0 # para o caso em que não haja itens for contagem_real, (id, obj) in enumerate(tree.iteritems(), start=1): obj, meta_type = br(obj), type(obj).__name__ yield id, obj, meta_type # verificação de consistência if contagem_esperada != contagem_real: print('ATENÇÃO: contagens diferentes na btree: ' - '{} esperada: {} real: {}'.format(folder, + '{} esperada: {} real: {}'.format(folder['title'], contagem_esperada, contagem_real)) From cfd5614170da2976e87748550e1e98d80ab66069 Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Wed, 23 May 2018 15:21:14 -0300 Subject: [PATCH 2/2] =?UTF-8?q?Adiciona=20compacta=C3=A7=C3=A3o=20de=20med?= =?UTF-8?q?ia=20ao=20comando=20de=20migra=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/legacy/migracao.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sapl/legacy/migracao.py b/sapl/legacy/migracao.py index 059e49164..ffd0d2a18 100644 --- a/sapl/legacy/migracao.py +++ b/sapl/legacy/migracao.py @@ -28,6 +28,7 @@ def migrar(interativo=False): migrar_usuarios(REPO.working_dir) migrar_documentos(REPO) gravar_marco() + compactar_media() def compactar_media():