From e9588a91a99a44678bfd180342b415b6903b9ce3 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Wed, 19 Jun 2024 18:14:14 +0800 Subject: [PATCH] :bug: Fix redeem default uid set to None --- plugins/starrail/redeem/runner.py | 2 +- plugins/tools/action_log_system.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/starrail/redeem/runner.py b/plugins/starrail/redeem/runner.py index 62e6ae6..76ae312 100644 --- a/plugins/starrail/redeem/runner.py +++ b/plugins/starrail/redeem/runner.py @@ -19,7 +19,7 @@ class RedeemResult: code: str message: Optional[Message] = None error: Optional[str] = None - uid: Optional[int] = 0 + uid: Optional[int] = None count: Optional[List[int]] = None diff --git a/plugins/tools/action_log_system.py b/plugins/tools/action_log_system.py index fee16b8..355f409 100644 --- a/plugins/tools/action_log_system.py +++ b/plugins/tools/action_log_system.py @@ -38,6 +38,8 @@ class ActionLogSystem(Plugin): async def import_action_log(self, client: "StarRailClient", authkey: str) -> bool: data = await client.get_starrail_action_log(authkey=authkey) # 确保第一个数据为登出、最后一条数据为登入 + if not data: + return False if data[0].status == 1: data.pop(0) if data[-1].status == 0: