events: fixed routing problems with new bootstrap_request logic.

This commit is contained in:
Marcin Kuzminski 2017-11-09 19:02:38 +01:00
parent b82576778b
commit 50b17eb2cf

View file

@ -27,7 +27,7 @@ from SocketServer import TCPServer
import rhodecode
from rhodecode.model import meta
from rhodecode.lib.base import bootstrap_request
from rhodecode.lib.base import bootstrap_request, bootstrap_config
from rhodecode.lib import hooks_base
from rhodecode.lib.utils2 import AttributeDict
@ -210,8 +210,9 @@ class Hooks(object):
def _call_hook(self, hook, extras):
extras = AttributeDict(extras)
server_url = extras['server_url']
extras.request = bootstrap_request(application_url=server_url)
request = bootstrap_request(application_url=server_url)
bootstrap_config(request) # inject routes and other interfaces
extras.request = request
try:
result = hook(extras)