do not break on missing intid

This commit is contained in:
Frédéric Péters 2013-07-16 14:51:39 +02:00
parent 49efef4243
commit bf7b2bce31
1 changed files with 4 additions and 1 deletions

View File

@ -36,7 +36,10 @@ class FolderViewlet(grok.Viewlet):
def documents(self):
intids = component.getUtility(IIntIds)
catalog = component.getUtility(ICatalog)
intid = intids.getId(self.context)
try:
intid = intids.getId(self.context)
except KeyError:
return []
documents = []
for item in catalog.findRelations({'to_id': intid}):
if item.isBroken():