diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2015-11-02 22:01:30 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2015-11-02 22:01:30 +0100 |
commit | 5c080b23f5c6b43243befb53e5560e773b5d027e (patch) | |
tree | e21fa02606556f8fbb8c414460974f1bfd1f1a38 /archaeological_operations/wizards.py | |
parent | 60d885f09a6f4bd90133fd029eb7983b5577ced8 (diff) | |
download | Ishtar-5c080b23f5c6b43243befb53e5560e773b5d027e.tar.bz2 Ishtar-5c080b23f5c6b43243befb53e5560e773b5d027e.zip |
Fix town managemnt for parcels
Diffstat (limited to 'archaeological_operations/wizards.py')
-rw-r--r-- | archaeological_operations/wizards.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py index cbc5a20c5..6f4a6583a 100644 --- a/archaeological_operations/wizards.py +++ b/archaeological_operations/wizards.py @@ -165,8 +165,14 @@ class OperationWizard(Wizard): multi=self.towns_formset, multi_value=self.multi_towns) or [] if town_ids: + towns = [] if type(town_ids) == unicode: - town_ids = town_ids.split(',') + town_ids = [town_ids] + for ids in town_ids: + for d in ids.split(','): + if d: + towns.append(d) + town_ids = towns break if type(town_ids) not in (list, tuple): town_ids = [town_ids] |