From eb42e2515b4590e22fe64fb35000896958ac8763 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Tue, 26 Sep 2023 23:26:18 -0400 Subject: [PATCH] paperwork: Fix sending certification emails when shop lead flag not set --- paperwork/certification_emails.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paperwork/certification_emails.py b/paperwork/certification_emails.py index ee24d8f..a5ade51 100644 --- a/paperwork/certification_emails.py +++ b/paperwork/certification_emails.py @@ -54,7 +54,8 @@ def department_emails(ordered_queryset): ) for department, certifications in certifications_by_department: - yield make_department_email(department, list(certifications)) + if department.shop_lead_flag is not None: + yield make_department_email(department, list(certifications)) def make_member_email(member, certifications):