From 979ce5cf038df8911e87cfde0f546931e506a051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Sun, 11 Aug 2024 03:28:34 +0800 Subject: [PATCH] fix --- LunaTranslator/LunaTranslator/myutils/config.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/LunaTranslator/LunaTranslator/myutils/config.py b/LunaTranslator/LunaTranslator/myutils/config.py index fc417197..ccc7bccc 100644 --- a/LunaTranslator/LunaTranslator/myutils/config.py +++ b/LunaTranslator/LunaTranslator/myutils/config.py @@ -468,13 +468,12 @@ for key in ___: globalconfig["toolbutton"]["rank2"].remove(key) if "DeckName" in globalconfig["ankiconnect"]: + deckname = globalconfig["ankiconnect"].pop("DeckName") if ( globalconfig["ankiconnect"]["DeckName"] not in globalconfig["ankiconnect"]["DeckNameS"] ): - globalconfig["ankiconnect"]["DeckNameS"].append( - globalconfig["ankiconnect"].pop("DeckName") - ) + globalconfig["ankiconnect"]["DeckNameS"].append(deckname) for data in savehook_new_data.values(): deck = data.get("anki_DeckName", "")