diff options
-rw-r--r-- | apioforum/thread.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apioforum/thread.py b/apioforum/thread.py index 20b02ca..daf0b85 100644 --- a/apioforum/thread.py +++ b/apioforum/thread.py @@ -127,7 +127,7 @@ def create_poll(thread_id): cur.execute("UPDATE threads SET poll = ? WHERE threads.id = ?",(pollid,thread_id)) cur.executemany( "INSERT INTO poll_options (poll,option_idx,text) VALUES (?,?,?)", - zip(itertools.repeat(pollid),range(1,len(polloptions)+1),polloptions) + zip(itertools.repeat(pollid),itertools.count(1),polloptions) ) db.commit() flash("poll created successfully") |