Use now() for trigger_date comparaison instead of date for issue345

This commit is contained in:
Cédric Krier committed 2008-09-10 13:22:39 +02:00
1 parent 55e3ae8ef5
commit 882ce44bf1
1 file changed
+2 -2
+2 -2
View File
@@ -131,8 +131,8 @@ class Request(OSV):
def request_get(self, cursor, user):
cursor.execute('SELECT id FROM res_request ' \
'WHERE act_to = %s ' \
'AND (trigger_date <= %s OR trigger_date IS NULL) ' \
'AND active = True', (user, time.strftime('%Y-%m-%d')))
'AND (trigger_date <= now() OR trigger_date IS NULL) ' \
'AND active = True', (user,))
ids = [x[0] for x in cursor.fetchall()]
cursor.execute('SELECT id FROM res_request ' \
'WHERE act_from = %s AND (act_to <> %s) ' \