mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-30 01:46:24 +01:00
Fixed another reference to django.db.get_models
This commit is contained in:
parent
354a5aaa80
commit
9cf1a81034
@ -1,5 +1,7 @@
|
||||
from django.db.models import Q, get_models
|
||||
from django.db.models import Q
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.apps import apps
|
||||
|
||||
from treebeard.mp_tree import MP_NodeQuerySet
|
||||
|
||||
from wagtail.wagtailsearch.backends import get_search_backend
|
||||
@ -154,7 +156,7 @@ class PageQuerySet(MP_NodeQuerySet):
|
||||
|
||||
def type_q(self, klass):
|
||||
content_types = ContentType.objects.get_for_models(*[
|
||||
model for model in get_models()
|
||||
model for model in apps.get_models()
|
||||
if issubclass(model, klass)
|
||||
]).values()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user