Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug sending 10+ mails to all users #3229

Merged
merged 1 commit into from Feb 26, 2023

Conversation

erlingfn
Copy link
Contributor

The restricted lookup returns a list containing each user multiple times. This results in each user receiving multiple copies of each weekly mail(I think). This sends out the weekly mail to each user just once, and also just does it for students.

@erlingfn erlingfn requested review from LudvigHz, ivarnakken and eikhr and removed request for LudvigHz February 26, 2023 19:54
Copy link
Member

@ivarnakken ivarnakken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: lgtm

lego/apps/email/tasks.py Outdated Show resolved Hide resolved
The restricted lookup returns a list containing each user multiple
times. This results in each user receiving multiple copies of each
weekly mail(I think). This sends out the weekly mail to each user just
once, and also just does it for students.
@ivarnakken ivarnakken added approved Pull requests that have been approved bug-fix Pull requests that fix a bug ready-to-merge Pull requests that have been approved and are ready to be merged labels Feb 26, 2023
@codecov
Copy link

codecov bot commented Feb 26, 2023

Codecov Report

Base: 88.31% // Head: 88.31% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (6038f82) compared to base (e6cd475).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3229   +/-   ##
=======================================
  Coverage   88.31%   88.31%           
=======================================
  Files         659      659           
  Lines       20760    20770   +10     
=======================================
+ Hits        18334    18344   +10     
  Misses       2426     2426           
Impacted Files Coverage Δ
lego/apps/email/tasks.py 98.38% <100.00%> (ø)
lego/apps/email/tests/test_weekly_email.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ivarnakken ivarnakken merged commit 6efa57d into master Feb 26, 2023
@ivarnakken ivarnakken deleted the fix-big-problem-weekly-mail branch February 26, 2023 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Pull requests that have been approved bug-fix Pull requests that fix a bug ready-to-merge Pull requests that have been approved and are ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants