diff --git a/articles/management/commands/check_pending_comments.py b/articles/management/commands/check_pending_comments.py index 2090c39..8e90f8d 100644 --- a/articles/management/commands/check_pending_comments.py +++ b/articles/management/commands/check_pending_comments.py @@ -16,5 +16,8 @@ class Command(BaseCommand): url = (settings.BLOG["base_url"] + url).replace( "//", "/" ) + "?status__exact=pending" - message = f"There are {count} comments pending review.\n{url}" + comments = "comment" + if count > 1: + comments += "s" + message = f"There are {count} {comments} pending review.\n{url}" mail_admins("Comments pending", message)