diff options
author | ubq323 <ubq323> | 2021-07-11 02:45:06 +0000 |
---|---|---|
committer | ubq323 <ubq323> | 2021-07-11 02:45:06 +0000 |
commit | 2eae97d6a08da4b832ccc69ce66bd15009001737 (patch) | |
tree | a6990d2a6a4ce9024679bfdd66f533f117012032 | |
parent | 94e93dffbc2f23823cfb6949828861063a3f3e23 (diff) |
actually that could be slightly neater
-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") |