diff --git a/opendrift_leeway_webgui/leeway/views.py b/opendrift_leeway_webgui/leeway/views.py index e2b1258..afdd9e0 100644 --- a/opendrift_leeway_webgui/leeway/views.py +++ b/opendrift_leeway_webgui/leeway/views.py @@ -115,6 +115,6 @@ class LeewaySimulationDeleteView(LoginRequiredMixin, DeleteView): def get(self, request, *args, **kwargs): if self.get_object().user == request.user: - self.object.delete() + self.get_object().delete() return HttpResponseRedirect("/simulations") return HttpResponseForbidden("Cannot delete other's simulations")