mirror of
https://github.com/DarkflameUniverse/NexusDashboard.git
synced 2024-11-09 19:58:19 +00:00
fixed active togglign with locked and ban
This commit is contained in:
parent
65ce84e090
commit
8ad6249275
@ -61,7 +61,8 @@ def edit_gm_level(id):
|
|||||||
@gm_level(3)
|
@gm_level(3)
|
||||||
def lock(id):
|
def lock(id):
|
||||||
account = Account.query.filter(Account.id == id).first()
|
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()
|
account.save()
|
||||||
if account.locked:
|
if account.locked:
|
||||||
log_audit(f"Locked ({account.id}){account.username}")
|
log_audit(f"Locked ({account.id}){account.username}")
|
||||||
@ -77,7 +78,8 @@ def lock(id):
|
|||||||
@gm_level(3)
|
@gm_level(3)
|
||||||
def ban(id):
|
def ban(id):
|
||||||
account = Account.query.filter(Account.id == id).first()
|
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()
|
account.save()
|
||||||
if account.banned:
|
if account.banned:
|
||||||
log_audit(f"Banned ({account.id}){account.username}")
|
log_audit(f"Banned ({account.id}){account.username}")
|
||||||
|
Loading…
Reference in New Issue
Block a user