From 34ea388269c4bfe654ab8bfdae67ca139162f1b7 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Thu, 20 Aug 2020 16:27:12 +0200 Subject: [PATCH] Mark moderated messages as not notified --- articles/admin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/articles/admin.py b/articles/admin.py index 9089785..3c65bf7 100644 --- a/articles/admin.py +++ b/articles/admin.py @@ -130,9 +130,9 @@ class CommentAdmin(admin.ModelAdmin): actions = ["approve_comments", "reject_comments"] def approve_comments(self, request, queryset): - count = queryset.update(status=Comment.APPROVED) + count = queryset.update(status=Comment.APPROVED, user_notified=False) messages.success(request, f"Approved {count} message(s).") def reject_comments(self, request, queryset): - count = queryset.update(status=Comment.REJECTED) + count = queryset.update(status=Comment.REJECTED, user_notified=False) messages.success(request, f"Rejected {count} message(s).")