diff options
Diffstat (limited to 'ishtar')
| -rw-r--r-- | ishtar/furnitures/forms_operations.py | 11 | 
1 files changed, 6 insertions, 5 deletions
| diff --git a/ishtar/furnitures/forms_operations.py b/ishtar/furnitures/forms_operations.py index c362a21e4..c83b9f450 100644 --- a/ishtar/furnitures/forms_operations.py +++ b/ishtar/furnitures/forms_operations.py @@ -109,7 +109,6 @@ class OperationWizard(Wizard):          if not step:              step = self.determine_step(request, storage)          form = self.get_form_list(request, storage)[step] -          general_form_key = 'general-' + self.url_name          # put hidden year field for refs          if data and step.startswith('refs-') \ @@ -119,9 +118,9 @@ class OperationWizard(Wizard):                                    [general_form_key][general_form_key+"-year"])              data[prefix+'-hidden_year'] = year          # manage the dynamic choice of towns -        if step.startswith('towns-') and hasattr(form, 'management_form'): +        if step.startswith('towns') and hasattr(form, 'management_form'):              data['TOWNS'] = self.get_towns(request, storage) -        elif step.startswith('parcels-') and hasattr(form, 'management_form'): +        elif step.startswith('parcels') and hasattr(form, 'management_form'):              file_id = self.session_get_value(request, storage, general_form_key,                                               "associated_file")              if file_id: @@ -134,10 +133,12 @@ class OperationWizard(Wizard):                      pass                  data['PARCELS'] = sorted(parcels, key=lambda x:x[1])              else: -                towns = [] -                town_form_key = 'towns-' + self.url_name +                town_form_key = step.startswith('parcelsgeneral') \ +                                and 'townsgeneral-' or 'towns-' +                town_form_key += self.url_name                  town_ids = self.session_get_value(request, storage,                                    town_form_key, 'town', multi=True) or [] +                towns = []                  for town_id in town_ids:                      try:                          town = models.Town.objects.get(pk=int(town_id)) | 
