Skip to content

Commit

Permalink
if conf points to an invalid configuration, fall back on default
Browse files Browse the repository at this point in the history
  • Loading branch information
dae committed Apr 30, 2020
1 parent c95983a commit 94d369d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pylib/anki/decks.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,9 @@ def confForDid(self, did: int) -> Any:
if "conf" in deck:
dcid = int(deck["conf"]) # may be a string
conf = self.get_config(dcid)
if not conf:
# fall back on default
conf = self.get_config(1)
conf["dyn"] = False
return conf
# dynamic decks have embedded conf
Expand Down

0 comments on commit 94d369d

Please sign in to comment.