diff --git a/rhodecode/events/__init__.py b/rhodecode/events/__init__.py --- a/rhodecode/events/__init__.py +++ b/rhodecode/events/__init__.py @@ -17,7 +17,7 @@ # and proprietary license terms, please see https://rhodecode.com/licenses/ import logging -from pyramid.threadlocal import get_current_registry + from rhodecode.events.base import RhodeCodeIntegrationEvent from rhodecode.events.base import ( # pragma: no cover @@ -71,6 +71,8 @@ def trigger(event, registry=None): # For the first step we are using pyramids thread locals here. If the # event mechanism works out as a good solution we should think about # passing the registry as an argument to get rid of it. + from pyramid.threadlocal import get_current_registry + event_name = event.__class__ log.debug('event %s sent for execution', event_name) registry = registry or get_current_registry()