Browse files

Fixed a critical bug where CMS_MODERATOR=False would prevent pages fr…

…om being added since Pages are not registered with mptt, thanks a lot to mbroch for reporting this.
  • Loading branch information...
Jonas Obrist
Jonas Obrist committed Dec 30, 2010
1 parent 564e3a5 commit 69c464e74b0002c0c4c03fa541c1a1dbf5262812
Showing with 4 additions and 1 deletion.
  1. +4 −1 cms/models/
@@ -9,7 +9,10 @@ class PageMetaClass(ModelBase):
def __new__(cls, name, bases, attrs):
super_new = super(PageMetaClass, cls).__new__
if not settings.CMS_MODERATOR:
- return super_new(cls, name, bases, attrs)
+ attrs = install_mptt(cls, name, bases, attrs)
+ new_class = super_new(cls, name, bases, attrs)
+ finish_mptt(new_class)
+ return new_class
if 'objects' in attrs:
if not isinstance(attrs['objects'], PublisherManager):

0 comments on commit 69c464e

Please sign in to comment.