From 3d5a427f85a97180fac1567d2f77109b59d667ea Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 14 Jan 2011 23:08:09 +0900 Subject: [PATCH] fix include&exclude tags case --- anki/deck.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/anki/deck.py b/anki/deck.py index 589b64ce4..1cad992a4 100644 --- a/anki/deck.py +++ b/anki/deck.py @@ -240,7 +240,8 @@ class Deck(object): return sql.replace( "where", "where +c.id in (select cardId from cardTags where " - "tagId in %s and tagId not in %s) and" % ( + "tagId in %s) and +c.id not in (select cardId from " + "cardTags where tagId in %s) and" % ( ids2str(yids), ids2str(nids))) elif no: