Fix: missing UE.ects

This commit is contained in:
Emmanuel Viennet 2024-02-22 16:46:19 +01:00
parent 13e7bd4512
commit 2dd7154036

View File

@ -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
)