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
|
return ctx
|
||||||
|
|
||||||
def delete(self, request, *args, **kwargs):
|
def form_valid(self, form):
|
||||||
response = super().delete(request, *args, **kwargs)
|
response = super().form_valid(form)
|
||||||
messages.add_message(request, messages.SUCCESS, self.get_deleted_text())
|
messages.add_message(self.request, messages.SUCCESS, self.get_deleted_text())
|
||||||
return response
|
return response
|
||||||
|
|
Loading…
Reference in New Issue