Une container method to iterate over visible paragraphs
authorThierry Florac <tflorac@ulthar.net>
Wed, 19 Sep 2018 11:11:30 +0200
changeset 89 be7c832763cd
parent 88 510571653a56
child 90 e1e8ceac4976
Une container method to iterate over visible paragraphs
src/pyams_content_es/component/paragraph.py
--- a/src/pyams_content_es/component/paragraph.py	Wed Sep 19 10:58:28 2018 +0200
+++ b/src/pyams_content_es/component/paragraph.py	Wed Sep 19 11:11:30 2018 +0200
@@ -37,9 +37,7 @@
 def paragraph_container_target_index_info(content):
     """Paragraph container index info"""
     body = {}
-    for paragraph in IParagraphContainer(content).values():
-        if not paragraph.visible:
-            continue
+    for paragraph in IParagraphContainer(content).get_visible_paragraphs():
         info = IDocumentIndexInfo(paragraph, None)
         if info is not None:
             for lang, info_body in info.items():