fix: log only for allowed_enroll email (#36254)

This commit is contained in:
Ahtisham Shahid
2025-02-14 14:48:02 +05:00
committed by GitHub
parent 3803c73857
commit 15cacf9dd0

View File

@@ -593,7 +593,7 @@ def send_mail_to_student(student, param_dict, language=None):
)
render_msg = presentation.render(DjangoEmailChannel, message)
if not render_msg.body_html.count(student):
if not render_msg.body_html.count(student) and message_type == 'allowed_enroll':
log.error(
{
'message': 'Email template does not contain required email address',