X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=reminder.py;h=67335a6d4065fcbb9da46f567875639a49e4fdf4;hb=cf3f4e59946cf26baefabce08e3f41a35c60e7db;hp=007487f207271c619f6f7a47da6b2e5966160026;hpb=0a372d651f8cdb8ab5f0442060104caef8319f18;p=cavote.git 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)