diff --git a/submissions/management/commands/email_fellows_tasklist.py b/submissions/management/commands/email_fellows_tasklist.py index 738473672d0b4a7b3ddad6426d6556ed4bd04f74..7425635d5187a336d97fa9832f2b8cd2261f6e10 100644 --- a/submissions/management/commands/email_fellows_tasklist.py +++ b/submissions/management/commands/email_fellows_tasklist.py @@ -28,13 +28,16 @@ class Command(BaseCommand): assignments_upcoming_deadline = assignments_ongoing.refereeing_deadline_within(days=7) if recs_to_vote_on or assignments_ongoing or assignments_to_consider or assignments_upcoming_deadline: mail_sender = DirectMailUtil( - 'fellows/email_fellow_tasklist', delayed_processing=False, # Render immediately, because m2m/querysets cannot be saved for later rendering. + 'fellows/email_fellow_tasklist', + # Render immediately, because m2m/querysets cannot be saved for later rendering: + delayed_processing=False, + object=fellow, fellow=fellow, nr_potfels_to_vote_on=nr_potfels_to_vote_on, recs_to_vote_on=recs_to_vote_on, assignments_ongoing=assignments_ongoing, assignments_to_consider=assignments_to_consider, assignments_upcoming_deadline=assignments_upcoming_deadline) - mail_sender.send() + mail_sender.send_mail() count += 1 self.stdout.write(self.style.SUCCESS('Emailed {} fellows.'.format(count)))