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:
Cayenne 2012-05-10 23:10:55 -04:00
parent 9af575395e
commit 0ff99d87be

View file

@ -233,8 +233,8 @@ body { margin: 1em; -webkit-user-select: none; }
if not deck['dyn']:
dids = [did] + [r[1] for r in self.mw.col.decks.children(did)]
cnt = self.mw.col.db.scalar(
"select count() from cards where did in %s" %
ids2str(dids))
"select count() from cards where did in {0} or "
"odid in {0}".format(ids2str(dids)))
if cnt:
extra = _(" It has %d cards.") % cnt
else: