diff --git a/anki/find.py b/anki/find.py index a07dd304e..dd0d07c0d 100644 --- a/anki/find.py +++ b/anki/find.py @@ -23,6 +23,7 @@ class Finder(object): deck=self._findDeck, mid=self._findMid, nid=self._findNids, + cid=self._findCids, note=self._findModel, prop=self._findProp, rated=self._findRated, @@ -335,6 +336,11 @@ select distinct(n.id) from cards c, notes n where c.nid=n.id and """+preds return return "n.id in (%s)" % val + def _findCids(self, (val, args)): + if re.search("[^0-9,]", val): + return + return "c.id in (%s)" % val + def _findMid(self, (val, args)): if re.search("[^0-9]", val): return