Merge pull request #14 from cayennes/count_everything

include crammed cards in count for deck deletion warning
This commit is contained in:
Damien Elmes 2012-05-12 17:03:46 -07:00
commit 32c3ccec4d

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: