From 91a6c880b46d261af52b1d93b87a58684812b19e Mon Sep 17 00:00:00 2001 From: aaron <> Date: Wed, 16 Apr 2025 20:25:28 +0800 Subject: [PATCH] update --- app/api/v1/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/v1/auth.py b/app/api/v1/auth.py index 36ba926..4e5374a 100644 --- a/app/api/v1/auth.py +++ b/app/api/v1/auth.py @@ -103,7 +103,7 @@ async def wechat_login( user = existing_user logger.info(f"现有用户登录: id={user.id}") - if user.user_code is None: + if not user.user_code: user.user_code = generate_user_code() user.nickname = f"搭友{user.user_code}" user.avatar = settings.DEFAULT_AVATAR