1
0
forked from ScoDoc/ScoDoc

Message erreur si bul_intro_mail invalide

This commit is contained in:
Emmanuel Viennet 2022-02-23 20:21:13 +01:00
parent 2cac0031f6
commit 6a07bb85a0

View File

@ -1013,11 +1013,16 @@ def mail_bulletin(formsemestre_id, I, pdfdata, filename, recipient_addr):
intro_mail = sco_preferences.get_preference("bul_intro_mail", formsemestre_id) intro_mail = sco_preferences.get_preference("bul_intro_mail", formsemestre_id)
if intro_mail: if intro_mail:
try:
hea = intro_mail % { hea = intro_mail % {
"nomprenom": etud["nomprenom"], "nomprenom": etud["nomprenom"],
"dept": dept, "dept": dept,
"webmaster": webmaster, "webmaster": webmaster,
} }
except KeyError as e:
raise ScoValueError(
"format 'Message d'accompagnement' (bul_intro_mail) invalide, revoir les réglages dans les préférences"
)
else: else:
hea = "" hea = ""