mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-20 21:11:55 +00:00
Added logging for moderation approval/rejection
This commit is contained in:
parent
4027262433
commit
df7110625a
1 changed files with 2 additions and 0 deletions
|
|
@ -985,10 +985,12 @@ class PageRevision(models.Model):
|
|||
|
||||
def approve_moderation(self):
|
||||
if self.submitted_for_moderation:
|
||||
logger.info("Page moderation approved: \"%s\" id=%d revision_id=%d", self.page.title, self.page.id, self.id)
|
||||
self.publish()
|
||||
|
||||
def reject_moderation(self):
|
||||
if self.submitted_for_moderation:
|
||||
logger.info("Page moderation rejected: \"%s\" id=%d revision_id=%d", self.page.title, self.page.id, self.id)
|
||||
self.submitted_for_moderation = False
|
||||
self.save(update_fields=['submitted_for_moderation'])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue