diff --git a/biz/models.py b/biz/models.py index f7da7bc..ffc6103 100644 --- a/biz/models.py +++ b/biz/models.py @@ -144,6 +144,11 @@ class Activity(BaseModel): def delete_dependencies(self): pass + def save(self, *args, **kwargs): + super().save(*args, **kwargs) + # Update last_update for all related prospects when activity is saved + self.prospects.update(last_update=timezone.now()) + class Meta: verbose_name_plural = "Activities" ordering = ['-creation_date']