From 52fd56e5e7803c1ce99b9ecfaf4396df655d305e Mon Sep 17 00:00:00 2001 From: Bertrand Bordage Date: Thu, 19 Oct 2017 15:40:26 +0100 Subject: [PATCH] Use `class_is_indexed`. --- wagtail/contrib/postgres_search/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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')