From 908c0b7dc8c2b9f7494734177fb9ae4171ac1e77 Mon Sep 17 00:00:00 2001 From: Laurent Date: Fri, 10 Oct 2025 11:58:34 +0200 Subject: [PATCH] Activity changes update the last_update field of the Prospect --- biz/models.py | 5 +++++ 1 file changed, 5 insertions(+) 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']