mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
Force Page._clean_sub/parent_page_types
to be a list
This commit is contained in:
parent
9aae3a1a23
commit
7b89f283db
@ -519,7 +519,7 @@ class Page(six.with_metaclass(PageBase, MP_Node, ClusterableModel, index.Indexed
|
||||
for model_string in subpage_types]
|
||||
except (NameError,) as err:
|
||||
raise NameError(err.args[0] + ' (used in subpage_types')
|
||||
res = map(ContentType.objects.get_for_model, models)
|
||||
res = list(map(ContentType.objects.get_for_model, models))
|
||||
|
||||
cls._clean_subpage_types = res
|
||||
|
||||
@ -542,7 +542,7 @@ class Page(six.with_metaclass(PageBase, MP_Node, ClusterableModel, index.Indexed
|
||||
for model_string in parent_page_types]
|
||||
except NameError as err:
|
||||
raise NameError(err.args[0] + ' (used in parent_page_types)')
|
||||
res = map(ContentType.objects.get_for_model, models)
|
||||
res = list(map(ContentType.objects.get_for_model, models))
|
||||
|
||||
cls._clean_parent_page_types = res
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user