fix: 资料页仅改头像不再误判为手机号认证

手机号认证流需同时带头像与 shoujihao_code 且无昵称;普通编辑只上传头像可正常保存。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-07-10 00:12:34 +08:00
parent 65dae4f3ab
commit 390202b9e4

View File

@@ -221,8 +221,8 @@ class UserInfoUpdateView(APIView):
else:
code = str(code or '').strip()
# 认证页仅上传头像+手机号,不带昵称
is_phone_auth_flow = bool(av) and not nick
# 手机号强制认证页:同时带头像 + shoujihao_code且不带 nicheng资料编辑页会带昵称
is_phone_auth_flow = bool(av) and bool(code) and not nick
phone_error = None
if is_phone_auth_flow and not code: