From 8ad624927508abae1589fba57e3d9bc49ffe1c53 Mon Sep 17 00:00:00 2001 From: Aaron Kimbre Date: Sun, 3 Apr 2022 15:47:21 -0500 Subject: [PATCH] fixed active togglign with locked and ban --- app/accounts.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/accounts.py b/app/accounts.py index e5faafc..308be19 100644 --- a/app/accounts.py +++ b/app/accounts.py @@ -61,7 +61,8 @@ def edit_gm_level(id): @gm_level(3) def lock(id): account = Account.query.filter(Account.id == id).first() - account.active = account.locked = not account.locked + account.locked = not account.locked + account.active = not account.locked account.save() if account.locked: log_audit(f"Locked ({account.id}){account.username}") @@ -77,7 +78,8 @@ def lock(id): @gm_level(3) def ban(id): account = Account.query.filter(Account.id == id).first() - account.active = account.banned = not account.banned + account.banned = not account.banned + account.active = not account.banned account.save() if account.banned: log_audit(f"Banned ({account.id}){account.username}")