예제 #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)
예제 #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))
예제 #3
0
파일: models.py 프로젝트: nijel/weblate
 def save(self, *args, **kwargs):
     super(AuditLog, self).save(*args, **kwargs)
     if self.should_notify():
         notify_auditlog.delay(self.pk)