From: Thomas D. <svn...@pl...> - 2012-05-03 20:44:50
|
Author: thomasdesvenain Date: Thu May 3 17:39:39 2012 New Revision: 249804 Modified: collective.edm.listing/trunk/collective/edm/listing/listing.py Log: fix if no view_url key Modified: collective.edm.listing/trunk/collective/edm/listing/listing.py ============================================================================== --- collective.edm.listing/trunk/collective/edm/listing/listing.py (original) +++ collective.edm.listing/trunk/collective/edm/listing/listing.py Thu May 3 17:39:39 2012 @@ -80,10 +80,12 @@ # bypass items not in page continue - if item['view_url'].endswith('folder_contents'): + if 'view_url' in item and item['view_url'].endswith('folder_contents'): item['view_url'] = item['view_url'].replace('/folder_contents', '') - if item['url_href_title'].endswith(': '):# todo: fix it in plone + + if 'url_href_title' in item and item['url_href_title'].endswith(': '):# todo: fix it in plone item['url_href_title'] = item['url_href_title'][:-2] + if self.wf_policy and item['brain'].review_state: chain = self._getPlacefulChainForType(item['brain'].portal_type) if chain: |