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:]
|
||||
|
||||
self.cur.execute('''
|
||||
insert into
|
||||
users (nick, husbando)
|
||||
values
|
||||
(%s, %s)
|
||||
on conflict (nick) do update set
|
||||
husbando = excluded.husbando
|
||||
''', [mask.nick, nick])
|
||||
try:
|
||||
self.cur.execute('''
|
||||
insert into
|
||||
users (nick, husbando)
|
||||
values
|
||||
(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))
|
||||
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