From 65ea5313c8e7e2774564e3ae7917f6e880645a7b Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Wed, 13 Nov 2019 17:39:02 +0100 Subject: [PATCH] Correcting flag search Currently, "flag:01" or "flag:12" does not throw exception, while it should. Now it'll be the case --- anki/find.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anki/find.py b/anki/find.py index 9302a2847..8ebca5346 100644 --- a/anki/find.py +++ b/anki/find.py @@ -275,7 +275,7 @@ select distinct(n.id) from cards c, notes n where c.nid=n.id and """+preds def _findFlag(self, args): (val, args) = args - if not val or val not in "01234": + if not val or len(val)!=1 or val not in "01234": return val = int(val) mask = 2**3 - 1