SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit d8bfb9df authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

First step is debugging email_fellows_tasklist management command

parent e25ae55e
No related branches found
No related tags found
No related merge requests found
...@@ -28,13 +28,16 @@ class Command(BaseCommand): ...@@ -28,13 +28,16 @@ class Command(BaseCommand):
assignments_upcoming_deadline = assignments_ongoing.refereeing_deadline_within(days=7) 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: if recs_to_vote_on or assignments_ongoing or assignments_to_consider or assignments_upcoming_deadline:
mail_sender = DirectMailUtil( 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, fellow=fellow,
nr_potfels_to_vote_on=nr_potfels_to_vote_on, nr_potfels_to_vote_on=nr_potfels_to_vote_on,
recs_to_vote_on=recs_to_vote_on, recs_to_vote_on=recs_to_vote_on,
assignments_ongoing=assignments_ongoing, assignments_ongoing=assignments_ongoing,
assignments_to_consider=assignments_to_consider, assignments_to_consider=assignments_to_consider,
assignments_upcoming_deadline=assignments_upcoming_deadline) assignments_upcoming_deadline=assignments_upcoming_deadline)
mail_sender.send() mail_sender.send_mail()
count += 1 count += 1
self.stdout.write(self.style.SUCCESS('Emailed {} fellows.'.format(count))) self.stdout.write(self.style.SUCCESS('Emailed {} fellows.'.format(count)))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment