- cur = g.db.execute('select title, description, date_begin, date_end from votes order by id desc')
- elif votes == 'archives':
- cur = g.db.execute('select title, description, date_begin, date_end from votes where date_end < (?) order by id desc', [today])
- elif votes == 'currently':
- cur = g.db.execute('select title, description, date_begin, date_end from votes where date_end >= (?) order by id desc', [today])
+ votes = query_db('select title, description, date_begin, date_end from votes order by id desc')
+ elif votes == 'archive':
+ votes = query_db('select title, description, date_begin, date_end from votes where date_end < (?) order by id desc', [today])
+ elif votes == 'current':
+ votes = query_db('select title, description, date_begin, date_end from votes where date_end >= (?) order by id desc', [today])