mirror of
https://github.com/Lynnesbian/FediBooks/
synced 2024-11-25 08:38:59 +00:00
insert ignore instead of replace to avoid cascade deletion from the bot learning list fricking WHOOPS
This commit is contained in:
parent
8469b73c3c
commit
d5db51830b
1 changed files with 1 additions and 1 deletions
|
@ -129,7 +129,7 @@ def bot_accounts_add(mysql, cfg):
|
|||
if r.status_code == 200:
|
||||
# success!!
|
||||
c = mysql.connection.cursor()
|
||||
c.execute("REPLACE INTO `fedi_accounts` (`handle`, `outbox`) VALUES (%s, %s)", (session['handle'], outbox))
|
||||
c.execute("INSERT IGNORE INTO `fedi_accounts` (`handle`, `outbox`) VALUES (%s, %s)", (session['handle'], outbox))
|
||||
c.execute("INSERT INTO `bot_learned_accounts` (`bot_id`, `fedi_id`) VALUES (%s, %s)", (session['bot'], session['handle']))
|
||||
c.close()
|
||||
mysql.connection.commit()
|
||||
|
|
Loading…
Reference in a new issue