From bc8d0f8244f73c3d95cf3dc001ef246093b93a9e Mon Sep 17 00:00:00 2001 From: xtaodada Date: Thu, 7 Dec 2023 15:09:34 +0800 Subject: [PATCH] :bug: Fix playcard data get invalid key --- modules/playercards/file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/playercards/file.py b/modules/playercards/file.py index e2c292d4..dcaf065e 100644 --- a/modules/playercards/file.py +++ b/modules/playercards/file.py @@ -68,7 +68,7 @@ class PlayerCardsFile: if old_data is None: await self.save_json(self.get_file_path(uid), data) return data - data["avatarInfoList"] = data.get("avatars") or [] + data["avatarInfoList"] = data.get("avatarInfoList") or [] characters = [i.get("avatarId", 0) for i in data["avatarInfoList"]] for i in old_data["avatarInfoList"]: if i.get("avatarId", 0) not in characters: