X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/869a46f8bd98f6f71a5cdd0b8c722b1686fe449c..6f16f6850fbdd4acb2a4f985b3a9dab0a3129e49:/forum/management/commands/send_email_alerts.py diff --git a/forum/management/commands/send_email_alerts.py b/forum/management/commands/send_email_alerts.py index 6f68f2c..85b83fa 100644 --- a/forum/management/commands/send_email_alerts.py +++ b/forum/management/commands/send_email_alerts.py @@ -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())