diff --git a/app/scodoc/sco_edit_module.py b/app/scodoc/sco_edit_module.py index 5014435d49..4d963c6e49 100644 --- a/app/scodoc/sco_edit_module.py +++ b/app/scodoc/sco_edit_module.py @@ -321,7 +321,7 @@ def module_edit( matieres = [ mat for mat in matieres - if ((module is not None) and (module.matiere.id == mat.id)) + if (module and module.matiere and (module.matiere.id == mat.id)) or (mat.id == mat.ue.matieres.first().id) ] mat_names = [