mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Fuzzy lookup results were not respecting type limits.
This commit is contained in:
parent
9596906621
commit
5eb41ddeb6
1 changed files with 2 additions and 0 deletions
|
@ -449,6 +449,8 @@ class PokedexLookup(object):
|
||||||
name, self.INTERMEDIATE_LOOKUP_RESULTS):
|
name, self.INTERMEDIATE_LOOKUP_RESULTS):
|
||||||
|
|
||||||
query = whoosh.query.Term('name', suggestion)
|
query = whoosh.query.Term('name', suggestion)
|
||||||
|
if type_term:
|
||||||
|
query = query & type_term
|
||||||
results.extend(searcher.search(query))
|
results.extend(searcher.search(query))
|
||||||
|
|
||||||
### Convert results to db objects
|
### Convert results to db objects
|
||||||
|
|
Loading…
Reference in a new issue