Skip to content

Commit

Permalink
Temporary fix, not recommended for any project
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Vetter committed Aug 28, 2013
1 parent f7e2555 commit 153097a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions fancypages/abstract_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,12 @@ def save(self, update_slugs=True, *args, **kwargs):
if cname not in existing_containers:
self.containers.create(page_object=self, name=cname)

parent = self.get_parent()
if parent:
for visibility_type in self.groups.all():
parent.groups.add(visibility_type)
parent.save()
#TODO: can't do this due to infinite recursion because
# category updates all child slugs. Needs proper fixing
#parent = self.get_parent()
#if parent:
# for group in self.groups.all():
# parent.groups.add(group)

class Meta:
app_label = 'fancypages'
Expand Down

0 comments on commit 153097a

Please sign in to comment.