From af2e9bdb9b068e889dc5424d7390d8b359aee3f9 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Wed, 2 Aug 2023 15:18:11 +0800 Subject: [PATCH] :bug: Fix abyss floor IndexError --- plugins/genshin/abyss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/genshin/abyss.py b/plugins/genshin/abyss.py index ede53ae..9a5dffe 100644 --- a/plugins/genshin/abyss.py +++ b/plugins/genshin/abyss.py @@ -311,7 +311,7 @@ class AbyssPlugin(Plugin): else: render_data["floor-num"] = f"十{num_dic.get(str(floor % 10))}" floors = jsonlib.loads(result)["floors"] - if (floor_data := list(filter(lambda x: x["floor"] == floor, floors))) is None: + if not (floor_data := list(filter(lambda x: x["floor"] == floor, floors))): return None avatars = await client.get_genshin_characters(uid, lang="zh-cn") render_data["avatar_data"] = {i.id: i.constellation for i in avatars}