--- a/ztfy/utils/catalog/__init__.py Sun Nov 20 12:52:25 2011 +0100
+++ b/ztfy/utils/catalog/__init__.py Sat Dec 10 01:32:15 2011 +0100
@@ -42,11 +42,11 @@
def getIntIdUtility(name='', request=None, context=None):
"""Look for a named IIntIds utility"""
if request is None:
- request = request_utils.getRequest()
+ request = request_utils.queryRequest()
intids = request_utils.getRequestData('IntIdsUtility::' + name, request)
if intids is None:
intids = queryUtility(IIntIds, name, context=context)
- if intids is not None:
+ if (request is not None) and (intids is not None):
request_utils.setRequestData('IntIdsUtility::' + name, intids, request)
return intids
@@ -56,7 +56,7 @@
if object is None:
return None
if request is None:
- request = request_utils.getRequest()
+ request = request_utils.queryRequest()
intids = getIntIdUtility(intids_name, request, context)
if intids is not None:
return intids.queryId(object)