make 'getObjectForUid' more tolerant
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3038 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
4697c0a22d
commit
d86dd04830
1 changed files with 4 additions and 1 deletions
5
util.py
5
util.py
|
@ -89,7 +89,10 @@ def getObjectForUid(uid, intIds=None):
|
|||
return None
|
||||
if intIds is None:
|
||||
intIds = component.getUtility(IIntIds)
|
||||
return intIds.getObject(int(uid))
|
||||
try:
|
||||
return intIds.getObject(int(uid))
|
||||
except KeyError:
|
||||
return None
|
||||
|
||||
def getUidForObject(obj, intIds=None):
|
||||
if obj == '*': # wild card
|
||||
|
|
Loading…
Add table
Reference in a new issue