remotes/1693045480750635534/spooky-22
Aevann1 2021-08-03 14:23:10 +02:00
parent 34b0e28cbb
commit 41af3d87e4
1 changed files with 4 additions and 4 deletions

View File

@ -961,10 +961,10 @@ def admin_ban_domain(v):
if not reason: abort(400)
d = g.db.query(BannedDomain).filter_by(domain=domain.replace("_","\_")).first()
if d: d.reason=reason
else: d = BannedDomain(domain=domain, reason=reason)
g.db.add(d)
if d: g.db.delete(d)
else:
d = BannedDomain(domain=domain, reason=reason)
g.db.add(d)
return redirect("/admin/banned_domains/")