mirror of
https://github.com/veekun/pokedex.git
synced 2024-07-03 02:55:49 +00:00
Fuzzy lookup results were not respecting type limits.
This commit is contained in:
parent
9596906621
commit
5eb41ddeb6
|
@ -449,6 +449,8 @@ class PokedexLookup(object):
|
|||
name, self.INTERMEDIATE_LOOKUP_RESULTS):
|
||||
|
||||
query = whoosh.query.Term('name', suggestion)
|
||||
if type_term:
|
||||
query = query & type_term
|
||||
results.extend(searcher.search(query))
|
||||
|
||||
### Convert results to db objects
|
||||
|
|
Loading…
Reference in a new issue