feat: use DeleteView.form_valid instead of DeleteView.delete
This commit is contained in:
parent
d62b8ab252
commit
f881ada65c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue