From 3f20430b70e39bc5ee4740d5808eed3078965f3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Tue, 14 Mar 2023 15:36:09 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20the=20exception=20raised?= =?UTF-8?q?=20when=20player=5Finfo=20is=20None?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/account/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/account/account.py b/plugins/account/account.py index 3c6af508..110ccc0c 100644 --- a/plugins/account/account.py +++ b/plugins/account/account.py @@ -163,7 +163,7 @@ class BindAccountPlugin(Plugin.Conversation): record_card = bind_account_plugin_data.record_card is_chosen = True 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 player = Player( user_id=user.id,