diff --git a/projectroles/models.py b/projectroles/models.py index 3ec8678f..e0c37160 100644 --- a/projectroles/models.py +++ b/projectroles/models.py @@ -197,13 +197,16 @@ def save(self, *args, **kwargs): self._validate_archive() # Update full title of self and children self.full_title = self._get_full_title() + # TODO: Save with commit=False with other args to avoid double save()? + super().save(*args, **kwargs) if self.type == PROJECT_TYPE_CATEGORY: for child in self.children.all(): child.save() # Update public children # NOTE: Parents will be updated in ProjectModifyMixin.modify_project() - self.has_public_children = self._has_public_children() - super().save(*args, **kwargs) + if self._has_public_children(): + self.has_public_children = True + super().save(*args, **kwargs) def _validate_parent(self): """ diff --git a/requirements/base.txt b/requirements/base.txt index 706351fd..5cee1c3c 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -8,7 +8,7 @@ setuptools>=67.6.0, <67.7 packaging>=23.0, <24.0 # Django -django==4.0.10 +django==4.1.13 # Configuration django-environ>=0.10.0, <0.11