Check for empty extract selection in thesaurus tree view
authorThierry Florac <thierry.florac@onf.fr>
Mon, 11 Jun 2018 11:45:02 +0200
changeset 605 d3d50fcbc62c
parent 604 581b1be90ee7
child 606 118d32d0ac38
Check for empty extract selection in thesaurus tree view
src/pyams_content/component/theme/zmi/__init__.py
--- a/src/pyams_content/component/theme/zmi/__init__.py	Mon Jun 11 08:51:03 2018 +0200
+++ b/src/pyams_content/component/theme/zmi/__init__.py	Mon Jun 11 11:45:02 2018 +0200
@@ -88,7 +88,7 @@
 
     def get_subterms(self, term):
         for subterm in term.specifics:
-            if self.extract_name in subterm.extracts:
+            if (not self.extract_name) or (self.extract_name in subterm.extracts):
                 yield subterm
                 for another in self.get_subterms(subterm):
                     yield another