diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-04-21 19:19:06 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-04-21 19:19:06 +0200 |
commit | 15fd5e2c3cfee083f1c562a7e3ccdf657d16acee (patch) | |
tree | 80369e0fb9835db63089875e6f4e3963f501437d /archaeological_operations/forms.py | |
parent | 42fe76e7bb82923acefed07b2e700d1e1ef88e1e (diff) | |
download | Ishtar-15fd5e2c3cfee083f1c562a7e3ccdf657d16acee.tar.bz2 Ishtar-15fd5e2c3cfee083f1c562a7e3ccdf657d16acee.zip |
Fix parcel formset initialisation
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r-- | archaeological_operations/forms.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index da9394d6c..b280e982e 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -105,7 +105,7 @@ class ParcelForm(forms.Form): prefix_value = kwargs['prefix'] + '-town' if not [k for k in kwargs['data'].keys() if k.startswith(prefix_value) and kwargs['data'][k]]: - kwargs['data'] = None + kwargs['data'] = {} if 'files' in kwargs: kwargs.pop('files') super(ParcelForm, self).__init__(*args, **kwargs) @@ -336,7 +336,6 @@ class ParcelFormSet(FormSet): def clean(self): # manage parcel selection - selected_town, parcels = None, [] if self.data.get('_parcel_selection'): parcels = parse_parcels(self.data['_parcel_selection']) selected_town = self.data.get('_town') |