summaryrefslogtreecommitdiff
path: root/archaeological_operations
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2015-02-13 13:20:45 +0100
committerÉtienne Loks <etienne.loks@proxience.com>2015-05-06 15:48:16 +0200
commit1d82730382ec543e67b60bd6a2b5f023f16d94e3 (patch)
tree46d9ec7b2553729262c65ff88be09e3cadb7c91d /archaeological_operations
parent405f6f089589a01ddd24421b8f05300a6ddb6ec9 (diff)
downloadIshtar-1d82730382ec543e67b60bd6a2b5f023f16d94e3.tar.bz2
Ishtar-1d82730382ec543e67b60bd6a2b5f023f16d94e3.zip
Wizard: search on multiple form for current town - Add research files form on archaeological_files_pdl
Diffstat (limited to 'archaeological_operations')
-rw-r--r--archaeological_operations/wizards.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py
index 7fdc26b12..01f15886d 100644
--- a/archaeological_operations/wizards.py
+++ b/archaeological_operations/wizards.py
@@ -39,7 +39,7 @@ class OperationWizard(Wizard):
model = models.Operation
object_parcel_type = 'operation'
parcel_step_key = 'parcelsgeneral-'
- town_step_key = 'towns-' # step contening the current(s) town(s)
+ town_step_keys = ['towns-'] # step contening the current(s) town(s)
town_input_id = 'town' # input id of the current(s) town(s)
multi_towns = True # true if current town are multi
wizard_done_window = reverse_lazy('show-operation')
@@ -139,10 +139,14 @@ class OperationWizard(Wizard):
if file:
data['PARCELS'] = self.get_available_parcels(file)
else:
- town_form_key = self.town_step_key + self.url_name
- town_ids = self.session_get_value(town_form_key,
+ town_ids = []
+ for town_step_key in self.town_step_keys:
+ town_form_key = town_step_key + self.url_name
+ town_ids = self.session_get_value(town_form_key,
self.town_input_id,
multi=self.multi_towns) or []
+ if town_ids:
+ break
if not self.multi_towns and town_ids:
town_ids = [town_ids]
towns = []