Prevent creating duplicate entried for Friendica blocks

This commit is contained in:
Mint 2023-03-12 22:11:47 +03:00
parent c29326745b
commit 441d050305

View file

@ -418,8 +418,8 @@ for blocker, software in c.fetchall():
timestamp = int(time()) timestamp = int(time())
c.execute( c.execute(
"select * from blocks where blocker = ? and blocked = ? and reason = ?", "select * from blocks where blocker = ? and blocked = ?",
(blocker, blocked, reason), (blocker, blocked),
) )
if c.fetchone() == None: if c.fetchone() == None:
c.execute( c.execute(