feat:Add notification when AN is set unchecked
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
dc3859d589
commit
8de5f162eb
@ -367,6 +367,11 @@ class AdoptionNotice(models.Model):
|
||||
self.adoptionnoticestatus.set_unchecked()
|
||||
self.save()
|
||||
|
||||
for subscription in self.get_subscriptions():
|
||||
notification_title = _("Vermittlung deaktiviert:") + f" {self}"
|
||||
text = _("Die folgende Vermittlung wurde deaktiviert: ") + f"{self.name}, {self.get_absolute_url()}"
|
||||
BaseNotification.objects.create(user=subscription.owner, text=text, title=notification_title)
|
||||
|
||||
|
||||
class AdoptionNoticeStatus(models.Model):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user