Fixed missing lower() in waifu/husbando insert
This commit is contained in:
parent
3e86c605f8
commit
dba70a7910
|
@ -111,7 +111,7 @@ class Useless(DatabasePlugin):
|
|||
insert into
|
||||
users (nick, waifu)
|
||||
values
|
||||
(%s, %s)
|
||||
(lower(%s), %s)
|
||||
on conflict (nick) do update set
|
||||
waifu = excluded.waifu
|
||||
''', [mask.nick, waifu])
|
||||
|
@ -148,17 +148,21 @@ class Useless(DatabasePlugin):
|
|||
if nick.startswith('='):
|
||||
nick = nick[1:]
|
||||
|
||||
try:
|
||||
self.cur.execute('''
|
||||
insert into
|
||||
users (nick, husbando)
|
||||
values
|
||||
(%s, %s)
|
||||
(lower(%s), %s)
|
||||
on conflict (nick) do update set
|
||||
husbando = excluded.husbando
|
||||
''', [mask.nick, nick])
|
||||
|
||||
self.bot.notice(mask.nick, 'Husbando set to: {husbando}'
|
||||
.format(husbando=nick))
|
||||
except Error:
|
||||
print(ex)
|
||||
self.con.rollback()
|
||||
else:
|
||||
self.cur.execute('''
|
||||
select
|
||||
|
|
Loading…
Reference in New Issue
Block a user