From 5a16046eddc753b752c5ab1fdb91595adf588a6b Mon Sep 17 00:00:00 2001 From: Mitsuo Tokumori Date: Mon, 13 Nov 2023 10:55:39 -0500 Subject: Add sample file upload for "load_data" blueprint Also add a success page that redirects to the Dashboard --- ustayml/views/students.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ustayml/views/students.py') 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}%" -- cgit v1.2.3