--- a/src/pyams_file/property.py Tue Mar 17 17:12:22 2015 +0100
+++ b/src/pyams_file/property.py Tue Mar 17 17:12:48 2015 +0100
@@ -23,7 +23,7 @@
# import packages
from pyams_file.file import FileFactory
-from pyams_utils.request import check_request
+from pyramid.threadlocal import get_current_registry
from zope.interface import alsoProvides
from zope.lifecycleevent import ObjectCreatedEvent, ObjectRemovedEvent, ObjectAddedEvent
from zope.location.location import locate
@@ -61,7 +61,7 @@
def __set__(self, instance, value):
if value is NOT_CHANGED:
return
- registry = check_request().registry
+ registry = get_current_registry()
if (value is not None) and (value is not DELETED_FILE):
filename = None
# file upload data converter returns a tuple containing