mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 23:42:23 -04:00
add byName9() to decks
This commit is contained in:
parent
3173073cff
commit
54e3436746
1 changed files with 6 additions and 0 deletions
|
@ -177,6 +177,12 @@ class DeckManager(object):
|
|||
elif default:
|
||||
return self.decks['1']
|
||||
|
||||
def byName(self, name):
|
||||
"Get deck with NAME."
|
||||
for m in self.decks.values():
|
||||
if m['name'] == name:
|
||||
return m
|
||||
|
||||
def update(self, g):
|
||||
"Add or update an existing deck. Used for syncing and merging."
|
||||
self.decks[str(g['id'])] = g
|
||||
|
|
Loading…
Reference in a new issue