🐛 Fix the issue of name_card being replaced when it is not None

This commit is contained in:
洛水居室 2023-04-28 14:42:19 +08:00
parent 9e23c1d20d
commit 3ec8b96c02
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC
2 changed files with 3 additions and 3 deletions

View File

@ -181,7 +181,7 @@ class AvatarListPlugin(Plugin):
logger.warning("未找到角色 %s 的星级", player_info.hand_image)
except Exception as exc: # pylint: disable=W0703
logger.error("卡片信息请求失败 %s", str(exc))
if name_card is not None: # 默认
if name_card is None: # 默认
name_card = (await self.assets_service.namecard(210001).navbar()).as_uri()
return name_card, avatar, nickname, rarity

View File

@ -42,7 +42,7 @@ class PlayerInfoSystem(Plugin):
logger.warning("未找到角色 %s 的等级", player_info.hand_image)
except Exception as exc: # pylint: disable=W0703
logger.error("卡片信息请求失败 %s", str(exc))
if name_card is not None: # 默认
if name_card is None: # 默认
name_card = (await self.assets_service.namecard(210001).navbar()).as_uri()
return name_card, avatar, nickname, rarity
@ -56,6 +56,6 @@ class PlayerInfoSystem(Plugin):
name_card = (await self.assets_service.namecard(int(player_info.name_card)).navbar()).as_uri()
except Exception as exc: # pylint: disable=W0703
logger.error("卡片信息请求失败 %s", str(exc))
if name_card is not None: # 默认
if name_card is None: # 默认
name_card = (await self.assets_service.namecard(210001).navbar()).as_uri()
return name_card