2 minor bugs

This commit is contained in:
Emmanuel Viennet 2022-07-11 21:39:30 +02:00
parent 45a2fa174c
commit 009de7a4ab
2 changed files with 3 additions and 1 deletions

View File

@ -89,6 +89,8 @@ def formation_list(formation_id=None, args={}):
def formation_has_locked_sems(formation_id): # XXX to remove
"backward compat: True if there is a locked formsemestre in this formation"
formation = Formation.query.get(formation_id)
if formation is None:
return False
return formation.has_locked_sems()

View File

@ -1785,7 +1785,7 @@ def get_formsemestre_session_id(sem, F, parcours):
"ImputationDept", sem["formsemestre_id"]
)
if not imputation_dept:
imputation_dept = sco_preferences.get_preference("DeptName")
imputation_dept = sco_preferences.get_preference("DeptName") or ""
imputation_dept = imputation_dept.upper()
parcours_type = parcours.NAME
modalite = sem["modalite"]