Commit fc527fea authored by Romain Courteaud's avatar Romain Courteaud

Bug fix: prevent business template crash when a object does not exist anymore

in the ZODB.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5853 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3613dc13
......@@ -708,7 +708,13 @@ class PathTemplateItem(ObjectTemplateItem):
id = id_list[0]
if re.search('[\*\?\[\]]', id) is None:
# If the id has no meta character, do not have to check all objects.
try:
obj = folder._getOb(id)
except AttributeError:
# XXX FIXME
LOG("WARNING!", 100,
"Can not resolve '%s' during business template installation." % id)
return []
return self._resolvePath(obj, relative_url_list + [id], id_list[1:])
path_list = []
for object_id in fnmatch.filter(folder.objectIds(), id):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment