Exemple #1
0
 def save(self, *args, **kwargs):
     super(AuditLog, self).save(*args, **kwargs)
     if self.should_notify():
         notify_auditlog.delay(self.pk, self.user.email)
Exemple #2
0
 def save(self, *args, **kwargs):
     super().save(*args, **kwargs)
     if self.should_notify():
         email = self.user.email
         transaction.on_commit(
             lambda: notify_auditlog.delay(self.pk, email))
Exemple #3
0
 def save(self, *args, **kwargs):
     super(AuditLog, self).save(*args, **kwargs)
     if self.should_notify():
         notify_auditlog.delay(self.pk)