--- a/src/pyams_utils/request.py Sat Mar 14 13:50:21 2015 +0100
+++ b/src/pyams_utils/request.py Tue Mar 17 16:04:14 2015 +0100
@@ -21,7 +21,7 @@
# import packages
from pyramid.request import Request
-from pyramid.threadlocal import get_current_request
+from pyramid.threadlocal import get_current_request, get_current_registry
from zope.interface import alsoProvides
@@ -50,7 +50,9 @@
try:
return get_request()
except MissingRequestError:
- return Request.blank(path, environ, base_url, headers, POST, **kw)
+ request = Request.blank(path, environ, base_url, headers, POST, **kw)
+ request.registry = get_current_registry()
+ return request
def get_annotations(request):