diff --git a/projects/forms.py b/projects/forms.py index 474dcc3..7104f32 100644 --- a/projects/forms.py +++ b/projects/forms.py @@ -139,7 +139,6 @@ def update(self, catalog, *, request): catalog.pofile = str(catalog.po) catalog.save() - catalog.project.save() else: messages.info(request, _("No changes detected.")) diff --git a/projects/models.py b/projects/models.py index b23391e..6d0835f 100644 --- a/projects/models.py +++ b/projects/models.py @@ -147,6 +147,12 @@ def __str__(self): f"{self.get_language_code_display()}, {self.domain} ({percent_translated})" ) + def save(self, *args, **kwargs): + super().save(*args, **kwargs) + self.project.save() + + save.alters_data = True + def get_absolute_url(self): return reverse( "projects:catalog",