mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-25 23:33:45 +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
39c9372e52
commit
eef4a70512
1 changed files with 1 additions and 1 deletions
|
|
@ -169,7 +169,7 @@ class PostgresSearchQuery(BaseSearchQuery):
|
|||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__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