From 29bdfb5cb0e44e4e39a2ac6ada13a0a31e27696c Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 10 May 2022 21:19:12 +0200 Subject: [PATCH] oups --- app/scodoc/sco_formations.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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