From: hernani Date: Thu, 8 Jul 2010 22:47:22 +0000 (+0000) Subject: Prevents empty digests from being sent. X-Git-Tag: live~628 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/0d5a900153f251326bbe15d87e8b1ef054f3d344 Prevents empty digests from being sent. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@506 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/management/commands/send_email_alerts.py b/forum/management/commands/send_email_alerts.py index 6f68f2c..4bc9951 100644 --- a/forum/management/commands/send_email_alerts.py +++ b/forum/management/commands/send_email_alerts.py @@ -105,6 +105,9 @@ class Command(NoArgsCommand): digest = DigestQuestionsIndex(from_date) + if (not new_member_count) and (not digest.count): + return + send_template_email(users, "notifications/digest.html", locals())