🐛 Fix the exception raised when player_info is None

This commit is contained in:
洛水居室 2023-03-14 15:36:09 +08:00
parent 913e566f5e
commit 3f20430b70
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC

View File

@ -163,7 +163,7 @@ class BindAccountPlugin(Plugin.Conversation):
record_card = bind_account_plugin_data.record_card record_card = bind_account_plugin_data.record_card
is_chosen = True is_chosen = True
player_info = await self.players_service.get_player(user.id) # 寻找主账号 player_info = await self.players_service.get_player(user.id) # 寻找主账号
if player_info.is_chosen: if player_info is not None and player_info.is_chosen:
is_chosen = False is_chosen = False
player = Player( player = Player(
user_id=user.id, user_id=user.id,