Fix exception si module sans matiere

This commit is contained in:
Emmanuel Viennet 2023-02-19 13:35:45 +01:00
parent f74713ac09
commit 52dfa16a69

View File

@ -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 = [