summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorubq323 <ubq323>2021-07-11 02:45:06 +0000
committerubq323 <ubq323>2021-07-11 02:45:06 +0000
commit2eae97d6a08da4b832ccc69ce66bd15009001737 (patch)
treea6990d2a6a4ce9024679bfdd66f533f117012032
parent94e93dffbc2f23823cfb6949828861063a3f3e23 (diff)
actually that could be slightly neater
-rw-r--r--apioforum/thread.py2
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")