mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-20 13:01:56 +00:00
Ensure we only look at SearchField records (not FilterField) to find boost values
It's valid for the same field to exist as both a SearchField and FilterField, and in this case get_boost would randomly find the FilterField and try (and fail) to read its 'boost' attribute.
This commit is contained in:
parent
4baa6cda58
commit
3ed72d3c0b
1 changed files with 1 additions and 1 deletions
|
|
@ -180,7 +180,7 @@ class PostgresSearchQuery(BaseSearchQuery):
|
|||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(PostgresSearchQuery, self).__init__(*args, **kwargs)
|
||||
self.search_fields = self.queryset.model.get_search_fields()
|
||||
self.search_fields = self.queryset.model.get_searchable_search_fields()
|
||||
|
||||
def get_search_query(self, config):
|
||||
combine = OR if self.operator == 'or' else AND
|
||||
|
|
|
|||
Loading…
Reference in a new issue