Skip to content

Commit 35795f4

Browse files
authored
Merge pull request #11485 from Ostap-Zherebetskyi/fix/no_login_duplicates
[ENG-9921] ensure distinct users are returned in no_login email task
2 parents 464ad5b + 12c57aa commit 35795f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/triggered_mails.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def find_inactive_users_without_enqueued_or_sent_no_login():
8181
date_last_login__lt=timezone.now() - settings.NO_LOGIN_OSF4M_WAIT_TIME,
8282
tags__name='osf4m'
8383
)
84-
)
84+
).distinct()
8585

8686
# Exclude users who already have a task for this email type
8787
return base_q.annotate(_has_task=Exists(existing_no_login)).filter(_has_task=False)

0 commit comments

Comments
 (0)