forked from ScoDoc/ScoDoc
Fix: bug "rennes" sur les formsemestres sans formation associée
This commit is contained in:
parent
5dc20aece0
commit
6f842dc877
@ -158,9 +158,24 @@ def formsemestre_bulletinetud_dict(formsemestre_id, etudid, version="long"):
|
|||||||
I["server_name"] = request.url_root
|
I["server_name"] = request.url_root
|
||||||
|
|
||||||
# Formation et parcours
|
# Formation et parcours
|
||||||
I["formation"] = sco_formations.formation_list(
|
if I["sem"]["formation_id"]:
|
||||||
args={"formation_id": I["sem"]["formation_id"]}
|
I["formation"] = sco_formations.formation_list(
|
||||||
)[0]
|
args={"formation_id": I["sem"]["formation_id"]}
|
||||||
|
)[0]
|
||||||
|
else: # what's the fuck ?
|
||||||
|
I["formation"] = {
|
||||||
|
"acronyme": "?",
|
||||||
|
"code_specialite": "",
|
||||||
|
"dept_id": 1,
|
||||||
|
"formation_code": "?",
|
||||||
|
"formation_id": -1,
|
||||||
|
"id": -1,
|
||||||
|
"referentiel_competence_id": None,
|
||||||
|
"titre": "?",
|
||||||
|
"titre_officiel": "?",
|
||||||
|
"type_parcours": 0,
|
||||||
|
"version": 0,
|
||||||
|
}
|
||||||
I["parcours"] = sco_codes_parcours.get_parcours_from_code(
|
I["parcours"] = sco_codes_parcours.get_parcours_from_code(
|
||||||
I["formation"]["type_parcours"]
|
I["formation"]["type_parcours"]
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user