From f881ada65c27c3f63b69c79c0fd8fa693026f68d Mon Sep 17 00:00:00 2001 From: shagi Date: Thu, 26 Oct 2023 15:39:20 +0200 Subject: [PATCH] feat: use DeleteView.form_valid instead of DeleteView.delete --- gas/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gas/views.py b/gas/views.py index 37b98a3..7cf9cd6 100644 --- a/gas/views.py +++ b/gas/views.py @@ -280,7 +280,7 @@ class GASDeleteView(GASMixin, DeleteView): }) return ctx - def delete(self, request, *args, **kwargs): - response = super().delete(request, *args, **kwargs) - messages.add_message(request, messages.SUCCESS, self.get_deleted_text()) + def form_valid(self, form): + response = super().form_valid(form) + messages.add_message(self.request, messages.SUCCESS, self.get_deleted_text()) return response