diff --git a/app/models/validations.py b/app/models/validations.py index 17dd12a6b..e97968768 100644 --- a/app/models/validations.py +++ b/app/models/validations.py @@ -126,7 +126,7 @@ class ScolarFormSemestreValidation(db.Model): def ects(self) -> float: "Les ECTS acquis par cette validation. (0 si ce n'est pas une validation d'UE)" return ( - self.ue.ects + self.ue.ects or 0.0 if (self.ue is not None) and (self.code in CODES_UE_VALIDES) else 0.0 )