From: Arnaud Delcasse Date: Wed, 12 Sep 2012 12:27:07 +0000 (+0200) Subject: Bug fix (was sending reminders only for 1 vote and not all) X-Git-Url: http://git.cyclocoop.org/?p=cavote.git;a=commitdiff_plain;h=cf3f4e59946cf26baefabce08e3f41a35c60e7db Bug fix (was sending reminders only for 1 vote and not all) --- diff --git a/reminder.py b/reminder.py index 007487f..67335a6 100644 --- a/reminder.py +++ b/reminder.py @@ -13,7 +13,7 @@ import sqlite3 conn = sqlite3.connect(DATABASE) c = conn.cursor() -for vote in c.execute('select id, id_group, date_end, title from votes where is_open=1 and is_terminated=0'): +for vote in c.execute('select id, id_group, date_end, title from votes where is_open=1 and is_terminated=0').fetchall(): date_end_vote = datetime.strptime(vote[2], "%Y-%m-%d") date_today = datetime.today() date_begin_reminder = date_end_vote + timedelta(days=-3)