feat: use DeleteView.form_valid instead of DeleteView.delete

This commit is contained in:
Ales (Shagi) Zabala Alava 2023-10-26 15:39:20 +02:00
parent d62b8ab252
commit f881ada65c
1 changed files with 3 additions and 3 deletions

View File

@ -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