--- a/src/pyams_security/notification.py Wed May 20 12:29:38 2015 +0200
+++ b/src/pyams_security/notification.py Wed May 20 12:30:17 2015 +0200
@@ -23,7 +23,7 @@
# import packages
from persistent import Persistent
from pyams_utils.adapter import adapter_config
-from pyams_utils.request import check_request
+from pyramid.threadlocal import get_current_registry
from zope.interface import implementer
from zope.lifecycleevent import ObjectCreatedEvent
from zope.schema.fieldproperty import FieldProperty
@@ -53,5 +53,5 @@
settings = annotations.get(NOTIFICATIONS_KEY)
if settings is None:
settings = annotations[NOTIFICATIONS_KEY] = NotificationSettings()
- check_request().registry.notify(ObjectCreatedEvent(settings))
+ get_current_registry().notify(ObjectCreatedEvent(settings))
return settings