Skip to content

Commit

Permalink
worked around a quirk that arouse with folders including only one item
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrandt09 committed Dec 19, 2012
1 parent 7bbebdb commit 1bc1d86
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions on/video/browser/videogallery.py
Expand Up @@ -59,8 +59,12 @@ def countFolderItems(item):
#import pdb; pdb.set_trace()

if item.getPortalTypeName() == 'Folder':
obj = item._brain.getObject()
flist = obj.folderlistingFolderContents()
# import pdb; pdb.set_trace()
try:
flist = item.folderlistingFolderContents()
except:
obj = item._brain.getObject()
flist = obj.folderlistingFolderContents()
if item.getPortalTypeName() == 'Collection':
catalog = getToolByName(self, 'portal_catalog')
flist = self.context.results(batch=False)
Expand Down

0 comments on commit 1bc1d86

Please sign in to comment.