🐛 Fix bug causing empty data retrieval when Enka fails to fetch information

This commit is contained in:
洛水居室 2023-10-17 21:41:58 +08:00
parent d61e19f689
commit 7792503944
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC

View File

@ -65,7 +65,8 @@ class PlayerInfoService(BaseService):
if player_info is None: if player_info is None:
player_info_enka = await self.get_player_info_from_enka(player.player_id) player_info_enka = await self.get_player_info_from_enka(player.player_id)
if player_info_enka is None: if player_info_enka is None:
return None # todo 如果拿不到 打算从其他接口获取
return PlayerInfo(user_id=player.user_id, player_id=player.player_id, nickname="")
player_info = PlayerInfo( player_info = PlayerInfo(
user_id=player.user_id, user_id=player.user_id,
player_id=player.player_id, player_id=player.player_id,