Updated pictograms vocabulary
authorThierry Florac <thierry.florac@onf.fr>
Wed, 14 Mar 2018 09:42:51 +0100
changeset 477 507662d4506a
parent 476 d925ee5950b3
child 478 c82b7fe3129b
Updated pictograms vocabulary
src/pyams_content/reference/pictograms/manager.py
--- a/src/pyams_content/reference/pictograms/manager.py	Wed Mar 14 09:41:36 2018 +0100
+++ b/src/pyams_content/reference/pictograms/manager.py	Wed Mar 14 09:42:51 2018 +0100
@@ -63,9 +63,10 @@
         terms = []
         table = query_utility(IPictogramTable)
         if table is not None:
-            manager = get_parent(context, IPictogramManagerTarget)
-            if manager is not None:
+            target = get_parent(context, IPictogramManagerTarget)
+            if target is not None:
                 request = check_request()
+                manager = IPictogramManager(target)
                 pictograms = [table.get(name) for name in manager.selected_pictograms]
                 terms = [SimpleTerm(v.__name__,
                                     title=II18n(v).query_attribute('title', request=request))