From 2dd7154036770010b38cba347c158132bb932e50 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 22 Feb 2024 16:46:19 +0100 Subject: [PATCH] Fix: missing UE.ects --- app/models/validations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/validations.py b/app/models/validations.py index 17dd12a6..e9796876 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 )