Skip to content

Commit

Permalink
CHG ignore email notifications for assignments with email_notificatio…
Browse files Browse the repository at this point in the history
…ns_enabled=False
  • Loading branch information
wabscale committed Aug 31, 2022
1 parent d010cff commit d5c3e4b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion api/jobs/email_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ def _send_assignment_condition_email_notifications(
course: Course = assignment.course
students: list[User] = get_course_users(course)

logger.info(f'Inspecting reference_type={reference_type} '
if not assignment.email_notifications_enabled:
logger.info(f'Skipping assignment reference_type={reference_type} '
f'assignment_id={assignment.id} course_id={assignment.course_id}')
continue

logger.info(f'Inspecting assignment reference_type={reference_type} '
f'assignment_id={assignment.id} course_id={assignment.course_id} ')

if not condition(assignment):
Expand Down

0 comments on commit d5c3e4b

Please sign in to comment.