mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-29 11:04:49 +00:00
Fixes the function to get ancestors content types.
This commit is contained in:
parent
7238125e4b
commit
b380703bcf
1 changed files with 3 additions and 2 deletions
|
|
@ -68,11 +68,12 @@ def get_content_type_pk(model):
|
|||
|
||||
def get_ancestors_content_types_pks(model):
|
||||
"""
|
||||
Returns content types ids for the descendants of this model, excluding it.
|
||||
Returns content types ids for the ancestors of this model, excluding it.
|
||||
"""
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
return [ct.pk for ct in
|
||||
ContentType.objects.get_for_models(*model._meta.parents).values()]
|
||||
ContentType.objects.get_for_models(*model._meta.get_parent_list())
|
||||
.values()]
|
||||
|
||||
|
||||
def get_descendants_content_types_pks(model):
|
||||
|
|
|
|||
Loading…
Reference in a new issue