mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
allow != in properties
This commit is contained in:
parent
b63ac7e80d
commit
942beef5de
2 changed files with 2 additions and 1 deletions
|
@ -256,7 +256,7 @@ class Finder(object):
|
|||
|
||||
def _findProp(self, val):
|
||||
# extract
|
||||
m = re.match("(^.+?)(<=|>=|=|<|>)(.+?$)", val)
|
||||
m = re.match("(^.+?)(<=|>=|!=|=|<|>)(.+?$)", val)
|
||||
if not m:
|
||||
return
|
||||
prop, cmp, val = m.groups()
|
||||
|
|
|
@ -161,6 +161,7 @@ def test_findCards():
|
|||
assert len(deck.findCards("prop:ivl>=5")) == 1
|
||||
assert len(deck.findCards("prop:ivl=9")) == 0
|
||||
assert len(deck.findCards("prop:ivl=10")) == 1
|
||||
assert len(deck.findCards("prop:ivl!=10")) > 1
|
||||
assert len(deck.findCards("prop:due>0")) == 1
|
||||
# due dates should work
|
||||
deck.sched.today = 15
|
||||
|
|
Loading…
Reference in a new issue