fix(typing): resolucion integral de advertencias de tipado, extraccion de payload con get_request_payload y limpieza de modelos

This commit is contained in:
2026-10-19 16:02:42 -03:00
parent 5ed62d5d30
commit eff5ed5ce0
13 changed files with 78 additions and 235 deletions
+3 -2
View File
@@ -58,7 +58,7 @@ class MilestoneGrade(db.Model):
"""Determina si la nota está aprobada (>= 4.00 y no ausente)."""
if self.is_absent or self.score is None:
return False
return self.score >= 4.0
return bool(float(self.score) >= 4.0)
@property
def display_score(self) -> str:
@@ -66,7 +66,8 @@ class MilestoneGrade(db.Model):
if self.is_absent:
return 'Ausente'
if self.score is not None:
return f'{self.score:.1f}' if self.score % 1 != 0 else f'{int(self.score)}'
val = float(self.score)
return f'{val:.1f}' if val % 1 != 0 else f'{int(val)}'
return '-'
def to_dict(self):