Don't send digest e-mails to users in deactivated realms.

(imported from commit dca53af9beac80242a5a96857595e99ccb75cf77)
This commit is contained in:
Jessica McKellar 2014-01-07 18:16:35 -05:00
parent 32549ec135
commit 33e8822165
1 changed files with 2 additions and 1 deletions

View File

@ -90,7 +90,8 @@ in a while.
if datetime.datetime.utcnow().weekday() not in VALID_DIGEST_DAYS:
return
all_domains = Realm.objects.values_list('domain', flat=True)
all_domains = Realm.objects.filter(
deactivated=False).values_list('domain', flat=True)
non_digest_domains = set(("users.customer4.invalid", "mit.edu"))
digest_domains = set(all_domains) - non_digest_domains