mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-21 22:58:05 +00:00
🐛 Fix merge player card info TypeError
This commit is contained in:
parent
416fb40d39
commit
061e2a28e6
@ -65,7 +65,8 @@ class PlayerCardsFile:
|
||||
if old_data is None:
|
||||
await self.save_json(self.get_file_path(uid), data)
|
||||
return data
|
||||
data["avatarInfoList"] = data.get("avatarInfoList", [])
|
||||
if data.get("avatarInfoList") is None:
|
||||
data["avatarInfoList"] = []
|
||||
characters = [i.get("avatarId", 0) for i in data["avatarInfoList"]]
|
||||
for i in old_data.get("avatarInfoList", []):
|
||||
if i.get("avatarId", 0) not in characters:
|
||||
|
Loading…
Reference in New Issue
Block a user