Exemplo n.º 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)
Exemplo n.º 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))
Exemplo n.º 3
0
 def save(self, *args, **kwargs):
     super(AuditLog, self).save(*args, **kwargs)
     if self.should_notify():
         notify_auditlog.delay(self.pk)