Commit adafaeeb by Sebastien Robin

added check of the date in case an alarm was not reindexed yet

git-svn-id: 20353a03-c40f-0410-a6d1-a30d3c3de9de
1 parent 416ba18b
......@@ -119,10 +119,11 @@ TemplateTool manages Business Templates."""
now = str(DateTime())
date_expression = '<= %s' % now
catalog_search = self.portal_catalog(portal_type = self.getPortalAlarmTypeList(), alarm_date=date_expression)
# 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]
catalog_search = self.portal_catalog(portal_type = self.getPortalAlarmTypeList())
alarm_list = map(lambda x:x.getObject(),catalog_search)
LOG('AlarmTool.getAlarmList, alarm_list',0,alarm_list)
return alarm_list
security.declareProtected(Permissions.ModifyPortalContent, 'tic')
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!