]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/management/commands/send_email_alerts.py
Removing the code that Hernani has removed in Revision 828 again. Somehow after the...
[osqa.git] / forum / management / commands / send_email_alerts.py
index 6f68f2c3060914ff5ba93added0b52c066123f22..85b83fae6e9be646e61dd266886454e7b4877893 100644 (file)
@@ -1,5 +1,6 @@
 import datetime
 from forum.models import *
+from forum import settings
 from django.db import models
 from forum.utils.mail import send_template_email
 from django.core.management.base import NoArgsCommand
@@ -105,6 +106,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())