0
0
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:
Tim Heap 2014-07-23 16:45:12 +10:00
parent 9aae3a1a23
commit 7b89f283db

View File

@ -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