Fix 500s on reason search
This commit is contained in:
parent
f5f7007080
commit
58835c64d2
2
api.py
2
api.py
@ -42,7 +42,7 @@ def blocked(domain: str = None, reason: str = None):
|
||||
c.execute("select blocker, blocked, block_level, reason from blocks where blocked = ? or blocked = ? or blocked = ? or blocked = ? or blocked = ? or blocked = ?",
|
||||
(domain, "*." + domain, wildchar, get_hash(domain), punycode, "*." + punycode))
|
||||
else:
|
||||
c.execute("select * from blocks where reason like ? and reason != ''", ("%"+reason+"%",))
|
||||
c.execute("select blocker, blocked, block_level, reason from blocks where reason like ? and reason != ''", ("%"+reason+"%",))
|
||||
blocks = c.fetchall()
|
||||
conn.close()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user