mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-22 07:07:46 +00:00
🐛 Fix KeyError when parse old gacha log data
This commit is contained in:
parent
d83d55858b
commit
5a3989efb1
@ -566,6 +566,8 @@ class GachaLog:
|
|||||||
if not status:
|
if not status:
|
||||||
raise GachaLogNotFound
|
raise GachaLogNotFound
|
||||||
pool_name = GACHA_TYPE_LIST[pool]
|
pool_name = GACHA_TYPE_LIST[pool]
|
||||||
|
if pool_name not in gacha_log.item_list:
|
||||||
|
raise GachaLogNotFound
|
||||||
data = gacha_log.item_list[pool_name]
|
data = gacha_log.item_list[pool_name]
|
||||||
total = len(data)
|
total = len(data)
|
||||||
if total == 0:
|
if total == 0:
|
||||||
@ -614,6 +616,8 @@ class GachaLog:
|
|||||||
if not status:
|
if not status:
|
||||||
raise GachaLogNotFound
|
raise GachaLogNotFound
|
||||||
pool_name = GACHA_TYPE_LIST[pool]
|
pool_name = GACHA_TYPE_LIST[pool]
|
||||||
|
if pool_name not in gacha_log.item_list:
|
||||||
|
raise GachaLogNotFound
|
||||||
data = gacha_log.item_list[pool_name]
|
data = gacha_log.item_list[pool_name]
|
||||||
total = len(data)
|
total = len(data)
|
||||||
if total == 0:
|
if total == 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user