From 89f74cb7093f3a728cfb6e244bf7e5acbe5cb909 Mon Sep 17 00:00:00 2001 From: moanos Date: Fri, 22 Nov 2024 18:50:23 +0100 Subject: [PATCH] fix: Save date of last checked Otherwise, ANs will get deactivated in the next night again --- src/fellchensammlung/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fellchensammlung/models.py b/src/fellchensammlung/models.py index 9bcce7a..a58f275 100644 --- a/src/fellchensammlung/models.py +++ b/src/fellchensammlung/models.py @@ -350,22 +350,22 @@ class AdoptionNotice(models.Model): def set_closed(self): self.last_checked = timezone.now() - self.adoptionnoticestatus.set_closed() self.save() + self.adoptionnoticestatus.set_closed() def set_active(self): self.last_checked = timezone.now() + self.save() if not hasattr(self, 'adoptionnoticestatus'): AdoptionNoticeStatus.create_other(self) self.adoptionnoticestatus.set_active() - self.save() def set_unchecked(self): self.last_checked = timezone.now() + self.save() if not hasattr(self, 'adoptionnoticestatus'): AdoptionNoticeStatus.create_other(self) self.adoptionnoticestatus.set_unchecked() - self.save() for subscription in self.get_subscriptions(): notification_title = _("Vermittlung deaktiviert:") + f" {self}"