diff --git a/wagtail/contrib/postgres_search/models.py b/wagtail/contrib/postgres_search/models.py index 81451134e0..3ae43c0d7d 100644 --- a/wagtail/contrib/postgres_search/models.py +++ b/wagtail/contrib/postgres_search/models.py @@ -10,7 +10,7 @@ from django.db.models.functions import Cast from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ -from ...wagtailsearch.index import Indexed +from ...wagtailsearch.index import class_is_indexed from .utils import get_descendants_content_types_pks @@ -66,6 +66,6 @@ class IndexEntry(Model): @classmethod def add_generic_relations(cls): for model in apps.get_models(): - if issubclass(model, Indexed): + if class_is_indexed(model): TextIDGenericRelation(cls).contribute_to_class(model, 'index_entries')