mirror of
https://github.com/DarkflameUniverse/NexusDashboard.git
synced 2024-11-21 21:17:23 +00:00
fix incorrect logging in name approval
This commit is contained in:
parent
a5ea052027
commit
34302006a9
@ -30,14 +30,20 @@ def approve_name(id, action):
|
|||||||
character = CharacterInfo.query.filter(CharacterInfo.id == id).first()
|
character = CharacterInfo.query.filter(CharacterInfo.id == id).first()
|
||||||
|
|
||||||
if action == "approve":
|
if action == "approve":
|
||||||
log_audit(f"Approved ({character.id}){character.pending_name} from {character.name}")
|
|
||||||
flash(
|
|
||||||
f"Approved ({character.id}){character.pending_name} from {character.name}",
|
|
||||||
"success"
|
|
||||||
)
|
|
||||||
if character.pending_name:
|
if character.pending_name:
|
||||||
character.name = character.pending_name
|
character.name = character.pending_name
|
||||||
character.pending_name = ""
|
character.pending_name = ""
|
||||||
|
log_audit(f"Approved ({character.id}){character.pending_name} from {character.name}")
|
||||||
|
flash(
|
||||||
|
f"Approved ({character.id}){character.pending_name} from {character.name}",
|
||||||
|
"success"
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
log_audit("Cannot make character name empty")
|
||||||
|
flash(
|
||||||
|
"Cannot make character name empty",
|
||||||
|
"danger"
|
||||||
|
)
|
||||||
character.needs_rename = False
|
character.needs_rename = False
|
||||||
|
|
||||||
elif action == "rename":
|
elif action == "rename":
|
||||||
|
Loading…
Reference in New Issue
Block a user