diff --git a/app/scodoc/sco_formations.py b/app/scodoc/sco_formations.py index 6c6e7019..ae6ecc0b 100644 --- a/app/scodoc/sco_formations.py +++ b/app/scodoc/sco_formations.py @@ -256,11 +256,8 @@ def formation_import_xml(doc: str, import_tags=True): mod_info[1]["formation_id"] = formation_id mod_info[1]["matiere_id"] = mat_id mod_info[1]["ue_id"] = ue_id - mod_info[1]["module_type"] = ( - scu.ModuleType.STANDARD - if mod_info[1]["module_type"] is None - else mod_info[1]["module_type"] - ) + if not "module_type" in mod_info[1]: + mod_info[1]["module_type"] = scu.ModuleType.STANDARD mod_id = sco_edit_module.do_module_create(mod_info[1]) if xml_module_id: modules_old2new[int(xml_module_id)] = mod_id