mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Oops, the old logic for starting option ids at 1 was bogus.
This commit is contained in:
parent
ef6e12ae90
commit
f85a069eec
@ -213,10 +213,7 @@ class Poll(callbacks.Privmsg, plugins.ChannelDBHandler):
|
||||
cursor.execute("""SELECT MAX(id)+1 FROM options
|
||||
WHERE poll_id=%s""",
|
||||
poll_id)
|
||||
if cursor.rowcount == 0:
|
||||
option_id = 1
|
||||
else:
|
||||
option_id = cursor.fetchone()[0]
|
||||
option_id = cursor.fetchone()[0] or 1
|
||||
cursor.execute("""INSERT INTO options VALUES
|
||||
(%s, %s, %s)""",
|
||||
option_id, poll_id, option)
|
||||
|
Loading…
Reference in New Issue
Block a user