diff --git a/categories/models.py b/categories/models.py index 8ff4c19..a1d86c9 100644 --- a/categories/models.py +++ b/categories/models.py @@ -101,11 +101,12 @@ class Category(MPTTModel): self.thumbnail_width = width self.thumbnail_height = height + super(Category, self).save(*args, **kwargs) + for item in self.get_descendants(): if item.active != self.active: item.active = self.active item.save() - super(Category, self).save(*args, **kwargs) class Meta: verbose_name_plural = 'categories'