Correcting flag search

Currently, "flag:01" or "flag:12" does not throw exception, while it
should. Now it'll be the case
This commit is contained in:
Arthur Milchior 2019-11-13 17:39:02 +01:00
parent f1c3f124e2
commit 65ea5313c8

View file

@ -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