if conf points to an invalid configuration, fall back on default

This commit is contained in:
Damien Elmes 2020-04-30 11:45:13 +10:00
parent c95983ac1f
commit 94d369db18

View File

@ -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