Commit e3f547f2 authored by Łukasz Nowak's avatar Łukasz Nowak

Fixup date passing.

parent fa695e83
......@@ -56,12 +56,12 @@ kw = {}\n
search_kw = {}\n
from DateTime import DateTime\n
from Products.ZSQLCatalog.SQLCatalog import Query\n
from Products.ERP5Type.DateUtils import getClosestDate, addToDate\n
from Products.ERP5Type.DateUtils import addToDate\n
\n
last_active_process = context.getLastActiveProcess()\n
if last_active_process is not None and not(params.get(\'full\', False)):\n
# fetch only objects modified since last alarm run\n
kw[\'modification_date\'] = Query(modification_date=last_active_process.getStartDate(), range="min")\n
kw[\'modification_date\'] = last_active_process.getStartDate()\n
search_kw[\'modification_date\'] = Query(modification_date=addToDate(last_active_process.getStartDate(), to_add={\'hour\': -1}), range="min")\n
# register active process in order to have "windows" of last indexed objects\n
context.newActiveProcess()\n
......
......@@ -51,12 +51,12 @@
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.ZSQLCatalog.SQLCatalog import Query\n
from Products.ERP5Type.DateUtils import addToDate\n
portal = context.getPortalObject()\n
\n
kw = {}\n
if modification_date is not None:\n
kw[\'modification_date\'] = Query(modification_date=modification_date, range="min")\n
\n
kw[\'modification_date\'] = Query(modification_date=addToDate(modification_date, to_add={\'hour\': -1}), range="min")\n
remove_hosting_list = []\n
add_kw_list = []\n
start_date_tuple_list = []\n
......
756
\ No newline at end of file
757
\ No newline at end of file
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