Commit 389bffba authored by Sebastien Robin's avatar Sebastien Robin

compare a date with a date, not a string


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3773 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent adafaeeb
......@@ -116,8 +116,8 @@ TemplateTool manages Business Templates."""
We retrieve thanks to the catalog the full list of alarms
"""
if to_active:
now = str(DateTime())
date_expression = '<= %s' % now
now = DateTime()
date_expression = '<= %s' % str(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]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment