summaryrefslogtreecommitdiff
path: root/archaeological_operations/wizards.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-11-24 19:39:06 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-11-24 19:39:06 +0100
commita1c527975f9be70e5d3807f072a05a52c35b7c8e (patch)
tree3eab6d3ab5f8da3f4cb7c803b2237928b27b9d74 /archaeological_operations/wizards.py
parent5d8a340c76470f47c45dd944a28f01b752ce6e98 (diff)
parentb1897e55f28e9c3f56c41ae90067ad9890598b4c (diff)
downloadIshtar-a1c527975f9be70e5d3807f072a05a52c35b7c8e.tar.bz2
Ishtar-a1c527975f9be70e5d3807f072a05a52c35b7c8e.zip
Merge branch 'develop' into develop-bootstrap
Diffstat (limited to 'archaeological_operations/wizards.py')
-rw-r--r--archaeological_operations/wizards.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py
index fffe34ca7..24c1af45b 100644
--- a/archaeological_operations/wizards.py
+++ b/archaeological_operations/wizards.py
@@ -23,6 +23,7 @@ from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.core.urlresolvers import reverse
from django.db.models import Max
+from django.http import Http404
from django.shortcuts import render
from django.utils.translation import ugettext_lazy as _
@@ -149,7 +150,10 @@ class OperationWizard(Wizard):
data = {}
if not step:
step = self.steps.current
- form = self.get_form_list()[step]
+ try:
+ form = self.get_form_list()[step]
+ except KeyError:
+ raise Http404()
# manage the dynamic choice of towns
if step.startswith('towns') and hasattr(form, 'management_form'):
data['TOWNS'] = self.get_towns()