diff --git a/app/api/endpoints/user.py b/app/api/endpoints/user.py index 35334d6..84b1575 100644 --- a/app/api/endpoints/user.py +++ b/app/api/endpoints/user.py @@ -137,7 +137,7 @@ async def get_user_info( user_data = user_info.model_dump() # 获取用户归属小区信息 - if current_user.community_id > 0: + if current_user.community_id: user_data['community_id'] = current_user.community_id community = db.query(CommunityDB).filter(CommunityDB.id == current_user.community_id).first() if community: