mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 09:16:38 -04:00
when deleting a deck, delete cards being crammed too
This commit is contained in:
parent
dd74e73c04
commit
2438ec9117
1 changed files with 4 additions and 1 deletions
|
@ -148,7 +148,10 @@ class DeckManager(object):
|
|||
self.rem(id, cardsToo)
|
||||
# delete cards too?
|
||||
if cardsToo:
|
||||
self.col.remCards(self.cids(did))
|
||||
# don't use cids(), as we want cards in cram decks too
|
||||
cids = self.col.db.list(
|
||||
"select id from cards where did=? or odid=?", did, did)
|
||||
self.col.remCards(cids)
|
||||
# delete the deck and add a grave
|
||||
del self.decks[str(did)]
|
||||
# ensure we have an active deck
|
||||
|
|
Loading…
Reference in a new issue