Skip to content

Commit

Permalink
Fix delete simulation view
Browse files Browse the repository at this point in the history
  • Loading branch information
svenseeberg committed Mar 17, 2024
1 parent 86748ea commit 700c0d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opendrift_leeway_webgui/leeway/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

0 comments on commit 700c0d3

Please sign in to comment.