summaryrefslogtreecommitdiff
path: root/archaeological_operations/wizards.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations/wizards.py')
-rw-r--r--archaeological_operations/wizards.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py
index df785fe6e..542d0118b 100644
--- a/archaeological_operations/wizards.py
+++ b/archaeological_operations/wizards.py
@@ -45,7 +45,8 @@ class OperationWizard(Wizard):
"""
context = super(OperationWizard, self).get_extra_context(request,
storage)
- step = self.determine_step(request, storage)
+ #step = self.determine_step(request, storage)
+ step = self.steps.current
if not step.startswith('towns-'):
return context
context['TOWNS'] = self.get_towns(request, storage)
@@ -79,7 +80,8 @@ class OperationWizard(Wizard):
else:
data = {}
if not step:
- step = self.determine_step(request, storage)
+ #step = self.determine_step(request, storage)
+ step = self.steps.current
form = self.get_form_list(request, storage)[step]
general_form_key = 'general-' + self.url_name
# manage the dynamic choice of towns
@@ -229,7 +231,9 @@ class AdministrativeActDeletionWizard(ClosingWizard):
context_instance=RequestContext(request))
def is_preventive(form_name, model, type_key='operation_type', key=''):
- def func(self, request, storage):
+ def func(self):
+ request = self.request
+ storage = self.storage
if storage.prefix not in request.session or \
'step_data' not in request.session[storage.prefix] or \
form_name not in request.session[storage.prefix]['step_data'] or\
@@ -238,7 +242,7 @@ def is_preventive(form_name, model, type_key='operation_type', key=''):
return False
try:
typ = int(request.session[storage.prefix]['step_data']\
- [form_name][form_name+'-'+type_key])
+ [form_name][form_name+'-'+type_key][0])
return model.is_preventive(typ, key)
except ValueError:
return False