mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Remove special lookup logic for forms.
This commit is contained in:
parent
10ebe04999
commit
043f8154ae
1 changed files with 1 additions and 9 deletions
|
@ -343,15 +343,7 @@ class PokedexLookup(object):
|
||||||
query = whoosh.query.Term(u'row_id', name)
|
query = whoosh.query.Term(u'row_id', name)
|
||||||
else:
|
else:
|
||||||
# Not an integer
|
# Not an integer
|
||||||
query = whoosh.query.Term(u'name', name) \
|
query = whoosh.query.Term(u'name', name)
|
||||||
& whoosh.query.Term(u'forme_name', u'__empty__')
|
|
||||||
|
|
||||||
# If there's a space in the input, this might be a form
|
|
||||||
if ' ' in name:
|
|
||||||
form, formless_name = name.split(' ', 1)
|
|
||||||
form_query = whoosh.query.Term(u'name', formless_name) \
|
|
||||||
& whoosh.query.Term(u'forme_name', form)
|
|
||||||
query = query | form_query
|
|
||||||
|
|
||||||
### Filter by type of object
|
### Filter by type of object
|
||||||
type_terms = []
|
type_terms = []
|
||||||
|
|
Loading…
Reference in a new issue