mirror of
https://github.com/ankitects/anki.git
synced 2025-11-12 07:37:11 -05:00
add children argument to decks.cids()
This commit is contained in:
parent
05782f9080
commit
2859f9c39d
1 changed files with 8 additions and 2 deletions
|
|
@ -297,8 +297,14 @@ class DeckManager(object):
|
|||
c = self.current()
|
||||
self.select(c['id'])
|
||||
|
||||
def cids(self, did):
|
||||
def cids(self, did, children=False):
|
||||
if not children:
|
||||
return self.col.db.list("select id from cards where did=?", did)
|
||||
dids = [did]
|
||||
for name, id in self.children(did):
|
||||
dids.append(id)
|
||||
return self.col.db.list("select id from cards where did in "+
|
||||
ids2str(dids))
|
||||
|
||||
# Deck selection
|
||||
#############################################################
|
||||
|
|
|
|||
Loading…
Reference in a new issue