# HG changeset patch # User Thierry Florac # Date 1347526585 -7200 # Node ID c02d355d3ffd5c9d241193dcae6ba27a744faca7 # Parent f0336de241c34f18ec184538807fc50396e9828d Better check for missing request in getIntIdUtility() function diff -r f0336de241c3 -r c02d355d3ffd src/ztfy/utils/catalog/__init__.py --- a/src/ztfy/utils/catalog/__init__.py Tue Sep 11 16:26:38 2012 +0200 +++ b/src/ztfy/utils/catalog/__init__.py Thu Sep 13 10:56:25 2012 +0200 @@ -43,7 +43,9 @@ """Look for a named IIntIds utility""" if request is None: request = request_utils.queryRequest() - intids = request_utils.getRequestData('IntIdsUtility::' + name, request) + intids = None + if request is not None: + intids = request_utils.getRequestData('IntIdsUtility::' + name, request) if intids is None: intids = queryUtility(IIntIds, name, context=context) if (request is not None) and (intids is not None):