Skip to content

Commit e19a282

Browse files
committed
fix: streamline error response for empty new username and password in account edit
1 parent fbc8667 commit e19a282

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

astrbot/dashboard/routes/auth.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ async def edit_account(self):
6464
new_pwd = post_data.get("new_password", None)
6565
new_username = post_data.get("new_username", None)
6666
if not new_pwd and not new_username:
67-
return (
68-
Response().error("新用户名和新密码不能同时为空").__dict__
69-
)
67+
return Response().error("新用户名和新密码不能同时为空").__dict__
7068

7169
# Verify password confirmation
7270
if new_pwd:

0 commit comments

Comments
 (0)