From 6ff10877ae48e730b55f5c58bd18b63e9a99ffa6 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 14 Mar 2022 20:20:49 +0100 Subject: [PATCH] Fix: bul json et mail --- app/scodoc/sco_bulletins.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/scodoc/sco_bulletins.py b/app/scodoc/sco_bulletins.py index 3bcb7a41c..ae73929b3 100644 --- a/app/scodoc/sco_bulletins.py +++ b/app/scodoc/sco_bulletins.py @@ -882,12 +882,12 @@ def do_formsemestre_bulletinetud( return bul, "" if formsemestre.formation.is_apc(): - etud = Identite.query.get(etudid) + etudiant = Identite.query.get(etudid) r = bulletin_but.BulletinBUT(formsemestre) - I = r.bulletin_etud_complet(etud, version=version) + I = r.bulletin_etud_complet(etudiant, version=version) else: I = formsemestre_bulletinetud_dict(formsemestre.id, etudid) - etud = I["etud"] + etud = I["etud"] if format == "html": htm, _ = sco_bulletins_generator.make_formsemestre_bulletinetud( @@ -930,7 +930,7 @@ def do_formsemestre_bulletinetud( if prefer_mail_perso: recipient_addr = etud.get("emailperso", "") or etud.get("email", "") else: - recipient_addr = etud["email_default"] + recipient_addr = etud.get("email", "") or etud.get("emailperso", "") if not recipient_addr: if nohtml: