diff options
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 = []  | 
