From f9c201957a1edc7349e346574bb485594c747196 Mon Sep 17 00:00:00 2001 From: ichim-david Date: Tue, 30 Aug 2016 18:32:46 +0300 Subject: [PATCH] - Check with getattr if item isPrincipiaFolderish as Comment does --- CHANGES.rst | 4 +++- plone/app/collection/collection.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index e4d00a5..8b0554f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -14,7 +14,9 @@ New features: Bug fixes: -- *add item here* +- Check with getattr if item isPrincipiaFolderish as Comment does + not have this attribute which would render an AttributeError + [ichim-david] 1.2.1 (2016-08-15) diff --git a/plone/app/collection/collection.py b/plone/app/collection/collection.py index 15ad3c2..3d6a1fc 100644 --- a/plone/app/collection/collection.py +++ b/plone/app/collection/collection.py @@ -170,7 +170,7 @@ def getFoldersAndImages(self): for item in results: item_path = item.getPath() - if item.isPrincipiaFolderish: + if getattr(item, 'isPrincipiaFolderish', []): query = { 'portal_type': image_types, 'path': item_path,