do not execute feature.delete() if DIRECT_EDITING is not enabled
This commit is contained in:
parent
9e36e33eaf
commit
39c70de49c
1 changed files with 3 additions and 0 deletions
|
@ -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', {})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue