forked from ScoDoc/DocScoDoc
Fix: bul. DUT en json avec accès par NIP
This commit is contained in:
parent
204ee4a02b
commit
e02a324165
@ -791,7 +791,7 @@ def etud_descr_situation_semestre(
|
||||
|
||||
# ------ Page bulletin
|
||||
def formsemestre_bulletinetud(
|
||||
etudid=None,
|
||||
etud: Identite = None,
|
||||
formsemestre_id=None,
|
||||
format=None,
|
||||
version="long",
|
||||
@ -801,14 +801,13 @@ def formsemestre_bulletinetud(
|
||||
):
|
||||
"page bulletin de notes"
|
||||
format = format or "html"
|
||||
etud: Identite = Identite.query.get_or_404(etudid)
|
||||
formsemestre: FormSemestre = FormSemestre.query.get(formsemestre_id)
|
||||
if not formsemestre:
|
||||
raise ScoValueError(f"semestre {formsemestre_id} inconnu !")
|
||||
|
||||
bulletin = do_formsemestre_bulletinetud(
|
||||
formsemestre,
|
||||
etudid,
|
||||
etud.id,
|
||||
format=format,
|
||||
version=version,
|
||||
xml_with_decisions=xml_with_decisions,
|
||||
|
@ -291,7 +291,6 @@ def formsemestre_bulletinetud(
|
||||
if not isinstance(formsemestre_id, int):
|
||||
raise ScoInvalidIdType("formsemestre_id must be an integer !")
|
||||
formsemestre = FormSemestre.query.get_or_404(formsemestre_id)
|
||||
if formsemestre.formation.is_apc() and format != "oldjson":
|
||||
if etudid:
|
||||
etud = models.Identite.query.get_or_404(etudid)
|
||||
elif code_nip:
|
||||
@ -308,8 +307,9 @@ def formsemestre_bulletinetud(
|
||||
)
|
||||
else:
|
||||
raise ScoValueError(
|
||||
"Paramètre manquant: spécifier code_nip ou etudid ou code_ine"
|
||||
"Paramètre manquant: spécifier etudid, code_nip ou code_ine"
|
||||
)
|
||||
if formsemestre.formation.is_apc() and format != "oldjson":
|
||||
if format == "json":
|
||||
r = bulletin_but.BulletinBUT(formsemestre)
|
||||
return jsonify(
|
||||
@ -354,7 +354,7 @@ def formsemestre_bulletinetud(
|
||||
if format == "oldjson":
|
||||
format = "json"
|
||||
return sco_bulletins.formsemestre_bulletinetud(
|
||||
etudid=etudid,
|
||||
etud,
|
||||
formsemestre_id=formsemestre_id,
|
||||
format=format,
|
||||
version=version,
|
||||
|
Loading…
Reference in New Issue
Block a user