Fix map check in DataLayerUpdate view
This commit is contained in:
parent
70a1a1d584
commit
ee9acf3427
1 changed files with 1 additions and 1 deletions
|
@ -914,7 +914,7 @@ class DataLayerUpdate(FormLessEditMixin, GZipMixin, UpdateView):
|
||||||
|
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
self.object = self.get_object()
|
self.object = self.get_object()
|
||||||
if self.object.map != self.kwargs["map_inst"]:
|
if self.object.map.pk != int(self.kwargs["map_id"]):
|
||||||
return HttpResponseForbidden()
|
return HttpResponseForbidden()
|
||||||
if not self.object.can_edit(user=self.request.user, request=self.request):
|
if not self.object.can_edit(user=self.request.user, request=self.request):
|
||||||
return HttpResponseForbidden()
|
return HttpResponseForbidden()
|
||||||
|
|
Loading…
Reference in a new issue