aboutsummaryrefslogtreecommitdiff
path: root/ustayml/views/students.py
diff options
context:
space:
mode:
Diffstat (limited to 'ustayml/views/students.py')
-rw-r--r--ustayml/views/students.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ustayml/views/students.py b/ustayml/views/students.py
index 6132746..3b31790 100644
--- a/ustayml/views/students.py
+++ b/ustayml/views/students.py
@@ -68,6 +68,9 @@ def details(student_id):
[student_id]
)
+ if s is None:
+ abort(404, "El ID del estudiante es inválido.")
+
s['fullname'] = f"{s['first_name']} {s['last_name']}"
s['current_attendance'] = f"{s['current_attendance'] * 100:.2f}%"
s['current_merit'] = f"{s['current_merit'] * 100:.2f}%"