mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-30 19:44:48 +00:00
Fixes PostgreSQL search backend for #2547.
This commit is contained in:
parent
1b070295c7
commit
1943d5a83c
1 changed files with 3 additions and 3 deletions
|
|
@ -87,14 +87,14 @@ class Index(object):
|
|||
yield (unidecode(self.prepare_value(field.get_value(obj))),
|
||||
get_weight(field.boost))
|
||||
elif isinstance(field, RelatedFields):
|
||||
sub_obj = getattr(obj, field.field_name)
|
||||
sub_obj = field.get_value(obj)
|
||||
if sub_obj is None:
|
||||
return
|
||||
if callable(sub_obj):
|
||||
sub_obj = sub_obj()
|
||||
if isinstance(sub_obj, Manager):
|
||||
sub_objs = sub_obj.all()
|
||||
else:
|
||||
if callable(sub_obj):
|
||||
sub_obj = sub_obj()
|
||||
sub_objs = [sub_obj]
|
||||
for sub_obj in sub_objs:
|
||||
for sub_field in field.fields:
|
||||
|
|
|
|||
Loading…
Reference in a new issue