Skip to content

Commit ff8b470

Browse files
committed
user survey email cmd: exclude blank email
Bug: T409420
1 parent 6a9bbd7 commit ff8b470

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

TWLight/users/management/commands/survey_active_users.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ def handle(self, *args, **options):
5454
# meet the block criterion or have the 'ignore wp blocks' exemption
5555
Q(editor__wp_not_blocked=True) | Q(editor__ignore_wp_blocks=True),
5656
# have an non-wikimedia.org email address
57-
Q(email__isnull=False) & ~Q(email__endswith="@wikimedia.org"),
57+
Q(email__isnull=False)
58+
& ~Q(email="")
59+
& ~Q(email__endswith="@wikimedia.org"),
5860
# have not already received the email
5961
userprofile__survey_email_sent=False,
6062
# meet the 6 month criterion as of last login

0 commit comments

Comments
 (0)