From 18909c834f11e5a1682c56088bd40daffb49aa74 Mon Sep 17 00:00:00 2001 From: Tim Heap Date: Thu, 24 Jul 2014 10:49:30 +1000 Subject: [PATCH] Replace all calls to clean_subpage_types with allowed_subpage_types `clean_subpage_types` should not be part of the public API any more, and `allowed_subpage_types` should replace it in all instances. --- wagtail/wagtailcore/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wagtail/wagtailcore/models.py b/wagtail/wagtailcore/models.py index 65d2930d2..dd1bdb52c 100644 --- a/wagtail/wagtailcore/models.py +++ b/wagtail/wagtailcore/models.py @@ -1057,7 +1057,7 @@ class PagePermissionTester(object): def can_add_subpage(self): if not self.user.is_active: return False - if not self.page.specific_class.clean_subpage_types(): # this page model has an empty subpage_types list, so no subpages are allowed + if not self.page.specific_class.allowed_subpage_types(): # this page model has an empty subpage_types list, so no subpages are allowed return False return self.user.is_superuser or ('add' in self.permissions) @@ -1121,7 +1121,7 @@ class PagePermissionTester(object): """ if not self.user.is_active: return False - if not self.page.specific_class.clean_subpage_types(): # this page model has an empty subpage_types list, so no subpages are allowed + if not self.page.specific_class.allowed_subpage_types(): # this page model has an empty subpage_types list, so no subpages are allowed return False return self.user.is_superuser or ('publish' in self.permissions)