mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
Included crammed cards in count for deck deletion warning
Previously, when a deck was being crammed, there was no warning about it containing cards when it was deleted. Then when the cram deck was deleted, which there is never any warning about, cards ended up deckless without there ever having been any clear warning that that would happen.
This commit is contained in:
parent
9af575395e
commit
0ff99d87be
1 changed files with 2 additions and 2 deletions
|
@ -233,8 +233,8 @@ body { margin: 1em; -webkit-user-select: none; }
|
||||||
if not deck['dyn']:
|
if not deck['dyn']:
|
||||||
dids = [did] + [r[1] for r in self.mw.col.decks.children(did)]
|
dids = [did] + [r[1] for r in self.mw.col.decks.children(did)]
|
||||||
cnt = self.mw.col.db.scalar(
|
cnt = self.mw.col.db.scalar(
|
||||||
"select count() from cards where did in %s" %
|
"select count() from cards where did in {0} or "
|
||||||
ids2str(dids))
|
"odid in {0}".format(ids2str(dids)))
|
||||||
if cnt:
|
if cnt:
|
||||||
extra = _(" It has %d cards.") % cnt
|
extra = _(" It has %d cards.") % cnt
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue