From 5c22dbcc312270af7444cf9a88a4a31384eb4421 Mon Sep 17 00:00:00 2001 From: candifloss Date: Tue, 25 Feb 2025 00:48:47 +0530 Subject: [PATCH] Fixed flash message in confirm_save.py --- routes/confirm_save.py | 1 - templates/upload.html | 22 ++++------------------ 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/routes/confirm_save.py b/routes/confirm_save.py index c818e42..f72cb2d 100644 --- a/routes/confirm_save.py +++ b/routes/confirm_save.py @@ -50,5 +50,4 @@ def confirm_save(): # Clear session data after successful insertion session.pop('assets', None) - flash("Data successfully saved to the database.", "success") return redirect('/viewall') \ No newline at end of file diff --git a/templates/upload.html b/templates/upload.html index 6db0a4f..de8b3e0 100644 --- a/templates/upload.html +++ b/templates/upload.html @@ -8,34 +8,20 @@

Upload CSV File

- - {% with messages = get_flashed_messages(with_categories=true) %} + + {% with messages = get_flashed_messages(category_filter=["error"]) %} {% if messages %}
Errors found during submission (click to expand):
{% endif %} {% endwith %} - - {% if errors %} -
- - Errors found in the CSV file (click to expand): - - -
- {% endif %} -