diff --git a/app/but/cursus_but.py b/app/but/cursus_but.py index 4a16bf05..e2c45c9f 100644 --- a/app/but/cursus_but.py +++ b/app/but/cursus_but.py @@ -512,6 +512,8 @@ def formation_semestre_niveaux_warning(formation: Formation, semestre_idx: int) """ annee = (semestre_idx - 1) // 2 + 1 # année BUT ref_comp: ApcReferentielCompetences = formation.referentiel_competence + if not ref_comp: + return "" # détecté ailleurs... niveaux_sans_ue_by_parcour = {} # { parcour.code : [ ue ... ] } parcours_ids = { uep.parcours_id diff --git a/app/scodoc/sco_edit_apc.py b/app/scodoc/sco_edit_apc.py index b56a9393..805fa1fb 100644 --- a/app/scodoc/sco_edit_apc.py +++ b/app/scodoc/sco_edit_apc.py @@ -28,7 +28,6 @@ from flask.templating import render_template from app import db -from app.but import cursus_but from app.models import UniteEns, Matiere, Module, FormSemestre, ModuleImpl from app.models.validations import ScolarFormSemestreValidation from app.scodoc import codes_cursus @@ -48,6 +47,8 @@ def html_edit_formation_apc( - Les ressources - Les SAÉs """ + from app.but import cursus_but + cursus = formation.get_cursus() assert cursus.APC_SAE