mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
don't genCards() into a cram deck
This commit is contained in:
parent
62b44df78e
commit
3c6707c17f
2 changed files with 7 additions and 0 deletions
|
@ -318,6 +318,10 @@ crt=?, mod=?, scm=?, dty=?, usn=?, ls=?, conf=?""",
|
|||
for t in self._tmplsFromOrds(model, avail):
|
||||
doHave = nid in have and t['ord'] in have[nid]
|
||||
if not doHave:
|
||||
# check deck is not a cram deck
|
||||
did = t['did'] or did
|
||||
if self.decks.isDyn(did):
|
||||
did = 1
|
||||
# we'd like to use the same due# as sibling cards, but we
|
||||
# can't retrieve that quickly, so we give it a new id
|
||||
# instead
|
||||
|
|
|
@ -417,3 +417,6 @@ class DeckManager(object):
|
|||
did = self.id(name, type=defaultDynamicDeck)
|
||||
self.select(did)
|
||||
return did
|
||||
|
||||
def isDyn(self, did):
|
||||
return self.get(did)['dyn']
|
||||
|
|
Loading…
Reference in a new issue