From 404505f3f368262fdb37dc3c7eb025ba39e850e9 Mon Sep 17 00:00:00 2001 From: JiaranYa Date: Fri, 31 Mar 2023 07:24:44 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=AA=81=E7=A0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复获取0级突破时产生的错误 --- LittlePaimon/database/models/character.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LittlePaimon/database/models/character.py b/LittlePaimon/database/models/character.py index 56e89ea..78127b9 100644 --- a/LittlePaimon/database/models/character.py +++ b/LittlePaimon/database/models/character.py @@ -306,7 +306,7 @@ class Character(Model): character.character_id = data['avatarId'] character.level = int(data['propMap']['4001']['val']) character.fetter = data['fetterInfo']['expLevel'] - character.promote_level = int(data['propMap']['1002']['val']) + character.promote_level = int(data['propMap']['1002'].get('val', 0)) if name in ['荧', '空']: character.region = '未知' character.rarity = 5