From e19a282c59aa16818705293e63845849cc5f2ed2 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Fri, 20 Feb 2026 18:35:26 +0800 Subject: [PATCH] fix: streamline error response for empty new username and password in account edit --- astrbot/dashboard/routes/auth.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/astrbot/dashboard/routes/auth.py b/astrbot/dashboard/routes/auth.py index 5cca8d2da..40db1f60b 100644 --- a/astrbot/dashboard/routes/auth.py +++ b/astrbot/dashboard/routes/auth.py @@ -64,9 +64,7 @@ class AuthRoute(Route): new_pwd = post_data.get("new_password", None) new_username = post_data.get("new_username", None) if not new_pwd and not new_username: - return ( - Response().error("新用户名和新密码不能同时为空").__dict__ - ) + return Response().error("新用户名和新密码不能同时为空").__dict__ # Verify password confirmation if new_pwd: