From d8bfb9dff9b0693afb6e120ef798dbb353736889 Mon Sep 17 00:00:00 2001 From: "J.-S. Caux" <J.S.Caux@uva.nl> Date: Tue, 26 Mar 2019 09:42:24 +0100 Subject: [PATCH] First step is debugging email_fellows_tasklist management command --- submissions/management/commands/email_fellows_tasklist.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/submissions/management/commands/email_fellows_tasklist.py b/submissions/management/commands/email_fellows_tasklist.py index 738473672..7425635d5 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))) -- GitLab