aboutsummaryrefslogtreecommitdiff
path: root/ustayml/views/students.py
diff options
context:
space:
mode:
authorMitsuo Tokumori <rtokumori@pucp.edu.pe>2023-11-13 10:55:39 -0500
committerMitsuo Tokumori <rtokumori@pucp.edu.pe>2023-11-13 10:55:39 -0500
commit5a16046eddc753b752c5ab1fdb91595adf588a6b (patch)
tree870192e1f576754c6fd669cd4e3dad6f70a7caf7 /ustayml/views/students.py
parentf6fcf9cc3ae3d93d59391b3f12843fba3297f0b2 (diff)
Add sample file upload for "load_data" blueprint
Also add a success page that redirects to the Dashboard
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}%"