Updated global registry access
authorThierry Florac <tflorac@ulthar.net>
Thu, 08 Feb 2018 08:55:52 +0100
changeset 56 7a46f121e6e5
parent 55 6136b4554c19
child 57 18a4afc2ab51
Updated global registry access
src/pyams_workflow/workflow.py
--- a/src/pyams_workflow/workflow.py	Fri Jan 26 17:31:56 2018 +0100
+++ b/src/pyams_workflow/workflow.py	Thu Feb 08 08:55:52 2018 +0100
@@ -22,12 +22,11 @@
 
 # import packages
 from pyams_utils.adapter import adapter_config
-from pyams_utils.registry import get_utility
+from pyams_utils.registry import get_utility, get_global_registry
 from pyams_utils.request import check_request, query_request
 from pyams_utils.traversing import get_parent
 from pyams_utils.vocabulary import vocabulary_config
 from pyramid.httpexceptions import HTTPUnauthorized
-from zope.component.globalregistry import getGlobalSiteManager
 from zope.componentvocabulary.vocabulary import UtilityVocabulary
 from zope.interface import implementer
 from zope.lifecycleevent import ObjectModifiedEvent
@@ -194,7 +193,7 @@
                                             transition.destination,
                                             transition, comment)
         # change state of context or new object
-        registry = getGlobalSiteManager()
+        registry = get_global_registry()
         registry.notify(event)
         # send modified event for original or new object
         if result is None: