diff options
| 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 | 
| commit | a584b08f7c347af2fb85df86ddd89430c14824c0 (patch) | |
| tree | 46d9ec7b2553729262c65ff88be09e3cadb7c91d /archaeological_operations/wizards.py | |
| parent | 059ab3c6a713fc9e84f2ff5f57664a407edd0985 (diff) | |
| download | Ishtar-a584b08f7c347af2fb85df86ddd89430c14824c0.tar.bz2 Ishtar-a584b08f7c347af2fb85df86ddd89430c14824c0.zip | |
Wizard: search on multiple form for current town - Add research files form on archaeological_files_pdl
Diffstat (limited to 'archaeological_operations/wizards.py')
| -rw-r--r-- | archaeological_operations/wizards.py | 10 | 
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 = [] | 
