mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
if conf points to an invalid configuration, fall back on default
This commit is contained in:
parent
c95983ac1f
commit
94d369db18
1 changed files with 3 additions and 0 deletions
|
@ -340,6 +340,9 @@ class DeckManager:
|
||||||
if "conf" in deck:
|
if "conf" in deck:
|
||||||
dcid = int(deck["conf"]) # may be a string
|
dcid = int(deck["conf"]) # may be a string
|
||||||
conf = self.get_config(dcid)
|
conf = self.get_config(dcid)
|
||||||
|
if not conf:
|
||||||
|
# fall back on default
|
||||||
|
conf = self.get_config(1)
|
||||||
conf["dyn"] = False
|
conf["dyn"] = False
|
||||||
return conf
|
return conf
|
||||||
# dynamic decks have embedded conf
|
# dynamic decks have embedded conf
|
||||||
|
|
Loading…
Reference in a new issue