From 3729994b5fa7dcee7da75f3b0dee0f433ec3e6a1 Mon Sep 17 00:00:00 2001 From: Thomas Rusiecki Date: Mon, 11 Nov 2024 14:12:26 -0300 Subject: [PATCH] grammar fix and todo added --- evidence/forms.py | 3 +-- evidence/views.py | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/evidence/forms.py b/evidence/forms.py index 353bbf4..0ac251f 100644 --- a/evidence/forms.py +++ b/evidence/forms.py @@ -38,10 +38,9 @@ class UploadForm(forms.Form): raise ValidationError( _("The snapshot already exists"), code="duplicate_snapshot", - params={"file_name": file_name}, ) - #Caught any error and display it as Validation Error so the Form handles it + #Catch any error and display it as Validation Error so the Form handles it except Exception as e: raise ValidationError( _("Error on '%(file_name)s': %(error)s"), diff --git a/evidence/views.py b/evidence/views.py index 201a621..65a033b 100644 --- a/evidence/views.py +++ b/evidence/views.py @@ -51,6 +51,7 @@ class UploadView(DashboardView, FormView): return response def form_invalid(self, form): + #TODO: change file_input field class to "is-invalid" if any errors occur response = super().form_invalid(form) return response