Commit 9cc5a5b2 by Yoshinori Okuji

Take it into account that alarm_date can be None.

git-svn-id: 20353a03-c40f-0410-a6d1-a30d3c3de9de
1 parent a590b23f
......@@ -122,8 +122,12 @@ class AlarmTool(BaseTool):
# check again the alarm date in case the alarm was not yet reindexed
alarm_list = [x.getObject() for x in catalog_search \
if x.getObject().getAlarmDate()<=now]
alarm_list = []
for x in catalog_search:
alarm = x.getObject()
alarm_date = alarm.getAlarmDate()
if alarm_date is not None and alarm_date <= now:
catalog_search = self.portal_catalog.unrestrictedSearchResults(
portal_type = self.getPortalAlarmTypeList()
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!