mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
In get_matches, verify that 'location' in fact exists -- is a valid search term.
This commit is contained in:
parent
56cf0d6559
commit
85698737be
@ -583,6 +583,8 @@ class ResultCache(SearchQueryParser): # {{{
|
|||||||
candidates = self.universal_set()
|
candidates = self.universal_set()
|
||||||
if len(candidates) == 0:
|
if len(candidates) == 0:
|
||||||
return matches
|
return matches
|
||||||
|
if location not in self.all_search_locations:
|
||||||
|
return matches
|
||||||
|
|
||||||
if len(location) > 2 and location.startswith('@') and \
|
if len(location) > 2 and location.startswith('@') and \
|
||||||
location[1:] in self.db_prefs['grouped_search_terms']:
|
location[1:] in self.db_prefs['grouped_search_terms']:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user