do not execute feature.delete() if DIRECT_EDITING is not enabled

This commit is contained in:
Laura Klünder 2016-09-26 13:36:09 +02:00
parent 9e36e33eaf
commit 39c70de49c

View file

@ -50,6 +50,9 @@ def edit_feature(request, name):
if request.method == 'POST':
if request.POST.get('delete') == '1':
if request.POST.get('delete_confirm') == '1':
if not settings.DIRECT_EDITING:
return render(request, 'editor/feature_success.html', {})
feature.delete()
return render(request, 'editor/feature_success.html', {})