1
0
forked from ScoDoc/ScoDoc

Fix: bul json et mail

This commit is contained in:
Emmanuel Viennet 2022-03-14 20:20:49 +01:00
parent e02a324165
commit 6ff10877ae

View File

@ -882,12 +882,12 @@ def do_formsemestre_bulletinetud(
return bul, "" return bul, ""
if formsemestre.formation.is_apc(): if formsemestre.formation.is_apc():
etud = Identite.query.get(etudid) etudiant = Identite.query.get(etudid)
r = bulletin_but.BulletinBUT(formsemestre) r = bulletin_but.BulletinBUT(formsemestre)
I = r.bulletin_etud_complet(etud, version=version) I = r.bulletin_etud_complet(etudiant, version=version)
else: else:
I = formsemestre_bulletinetud_dict(formsemestre.id, etudid) I = formsemestre_bulletinetud_dict(formsemestre.id, etudid)
etud = I["etud"] etud = I["etud"]
if format == "html": if format == "html":
htm, _ = sco_bulletins_generator.make_formsemestre_bulletinetud( htm, _ = sco_bulletins_generator.make_formsemestre_bulletinetud(
@ -930,7 +930,7 @@ def do_formsemestre_bulletinetud(
if prefer_mail_perso: if prefer_mail_perso:
recipient_addr = etud.get("emailperso", "") or etud.get("email", "") recipient_addr = etud.get("emailperso", "") or etud.get("email", "")
else: else:
recipient_addr = etud["email_default"] recipient_addr = etud.get("email", "") or etud.get("emailperso", "")
if not recipient_addr: if not recipient_addr:
if nohtml: if nohtml: