def save(self, *args, **kwargs): super(AuditLog, self).save(*args, **kwargs) if self.should_notify(): notify_auditlog.delay(self.pk, self.user.email)
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))
def save(self, *args, **kwargs): super(AuditLog, self).save(*args, **kwargs) if self.should_notify(): notify_auditlog.delay(self.pk)