Various minor bugfixes.

This commit is contained in:
Gaetan Delannay 2010-01-20 21:51:17 +01:00
parent 24c0dee96c
commit 3bb907ca5d
4 changed files with 24 additions and 8 deletions

View file

@ -648,11 +648,18 @@ class ToolMixin(AbstractMixin):
res[urlKey] = None
if needIt:
exec 'index = %sIndex' % urlType
brain = self.uid_catalog(UID=uids[index])
if brain:
baseUrl = brain[0].getObject().getUrl()
navUrl = baseUrl + '/?nav=' + newNav % (index + 1)
res['%sUrl' % urlType] = navUrl
uid = None
try:
uid = uids[index]
# uids can be a list (ref) or a dict (search)
except KeyError: pass
except IndexError: pass
if uid:
brain = self.uid_catalog(UID=uid)
if brain:
baseUrl = brain[0].getObject().getUrl()
navUrl = baseUrl + '/?nav=' + newNav % (index + 1)
res[urlKey] = navUrl
return res
def tabularize(self, data, numberOfRows):