]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/management/commands/send_email_alerts.py
Adds the option to enable/disable email digests and makes small tweak on the handling...
[osqa.git] / forum / management / commands / send_email_alerts.py
index 4cdb2e1d35636fa27a5061539d83095db69a067c..1dd55ab99266c406483351143b5b6c859b3f5afd 100644 (file)
@@ -92,7 +92,7 @@ class Command(NoArgsCommand):
 
         EMAIL_DIGEST_CONTROL.set_value(digest_control)
 
-        users = User.objects.filter(subscription_settings__enable_notifications=True)
+        users = User.objects.filter(subscription_settings__enable_notifications=True, subscription_settings__send_digest=True)
         new_members = User.objects.filter(is_active=True, date_joined__gt=from_date).annotate(n_actions=models.Count('actions')).order_by('-n_actions')
 
         new_member_count = new_members.count()