restore should not collide with delete

This commit is contained in:
Laura Klünder 2017-06-25 18:29:30 +02:00
parent fc873d990c
commit 769b643374

View file

@ -24,7 +24,7 @@ def changeset_detail(request, pk, show_history=False):
if request.method == 'POST':
restore = request.POST.get('restore')
if restore.isdigit():
if restore and restore.isdigit():
change = changeset.changes.filter(pk=restore).first()
if change is not None and change.can_restore:
if request.POST.get('restore_confirm') != '1':