From 5c080b23f5c6b43243befb53e5560e773b5d027e Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 2 Nov 2015 22:01:30 +0100 Subject: Fix town managemnt for parcels --- archaeological_operations/wizards.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'archaeological_operations/wizards.py') 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] -- cgit v1.2.3