mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
add restore to default option
This commit is contained in:
parent
78494283c2
commit
45c218f807
1 changed files with 7 additions and 0 deletions
|
@ -227,6 +227,13 @@ class DeckManager(object):
|
|||
dids.append(deck['id'])
|
||||
return dids
|
||||
|
||||
def restoreToDefault(self, conf):
|
||||
new = copy.deepcopy(defaultConf)
|
||||
new['id'] = conf['id']
|
||||
new['name'] = conf['name']
|
||||
self.dconf[str(conf['id'])] = new
|
||||
self.save(new)
|
||||
|
||||
# Deck utils
|
||||
#############################################################
|
||||
|
||||
|
|
Loading…
Reference in a new issue