mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
is:learn should match relearning cards too - filter on queue, not type
This commit is contained in:
parent
7c1ff307ed
commit
fa4f26e560
2 changed files with 3 additions and 3 deletions
|
@ -257,8 +257,8 @@ select distinct(n.id) from cards c, notes n where c.nid=n.id and """+preds
|
|||
elif val == "new":
|
||||
n = 0
|
||||
else:
|
||||
n = 1
|
||||
return "type = %d" % n
|
||||
return "queue in (1, 3)"
|
||||
return "queue = %d" % n
|
||||
elif val == "suspended":
|
||||
return "c.queue = -1"
|
||||
elif val == "due":
|
||||
|
|
|
@ -74,7 +74,7 @@ def test_findCards():
|
|||
assert len(deck.findCards('"goats are"')) == 1
|
||||
# card states
|
||||
c = f.cards()[0]
|
||||
c.type = 2
|
||||
c.queue = 2
|
||||
assert deck.findCards("is:review") == []
|
||||
c.flush()
|
||||
assert deck.findCards("is:review") == [c.id]
|
||||
|
|
Loading…
Reference in a new issue