mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-03 15:38:59 +00:00
Add support for notification emails on m2m changes
Unfortunately, we'll send one email for each m2m field, instead of collecting them to a single one. That's because there is no signal delivered at the end of them all, there will be one sent for each field. Luckily we don't have a lot of m2m fields at this point, and no model has more than one, so at this point that part is not a problem. It also means that if a regular field *and* an m2m field is changed, then we will get two notifications. Finally, enable these notifications for the Organisation fields, meaning we will get a notification when an Organisation changes managers, which was not working before.
This commit is contained in:
@ -125,6 +125,7 @@ class Organisation(models.Model):
|
||||
lastconfirmed = models.DateTimeField(null=False, blank=False, auto_now_add=True)
|
||||
|
||||
send_notification = True
|
||||
send_m2m_notification = True
|
||||
|
||||
def __unicode__(self):
|
||||
return self.name
|
||||
|
Reference in New Issue
Block a user