mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 17:26:36 -04:00
don't throw a traceback with an invalid fid
This commit is contained in:
parent
03ae1d6ca7
commit
a9f3e4dca7
1 changed files with 6 additions and 1 deletions
|
@ -1864,7 +1864,12 @@ where id = :id""", pending)
|
||||||
token = token[3:]
|
token = token[3:]
|
||||||
type = SEARCH_TYPE
|
type = SEARCH_TYPE
|
||||||
elif token.startswith("fid:") and len(token) > 4:
|
elif token.startswith("fid:") and len(token) > 4:
|
||||||
token = token[4:]
|
dec = token[4:]
|
||||||
|
try:
|
||||||
|
int(dec)
|
||||||
|
token = token[4:]
|
||||||
|
except:
|
||||||
|
token = "0"
|
||||||
type = SEARCH_FID
|
type = SEARCH_FID
|
||||||
else:
|
else:
|
||||||
type = SEARCH_PHRASE
|
type = SEARCH_PHRASE
|
||||||
|
|
Loading…
Reference in a new issue