diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-07-05 02:34:49 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-07-05 02:34:49 +0200 |
commit | ba63aedc862c1877a53cac172463269c62e46d74 (patch) | |
tree | 3d9ad77c1c38881bbe5344282b829090771468d4 /archaeological_operations/forms.py | |
parent | 1db592248963926948e6306d4288411e7bc7fbb4 (diff) | |
download | Ishtar-ba63aedc862c1877a53cac172463269c62e46d74.tar.bz2 Ishtar-ba63aedc862c1877a53cac172463269c62e46d74.zip |
Town/Parcel form: fix modification (refs #3642, refs #3640)
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r-- | archaeological_operations/forms.py | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index acd0fb099..4a7d56024 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -1044,13 +1044,6 @@ class SelectedTownForm(forms.Form): towns = None if 'data' in kwargs and 'TOWNS' in kwargs['data']: towns = kwargs['data']['TOWNS'] - # clean data if not "real" data - 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 - if 'files' in kwargs: - kwargs.pop('files') super(SelectedTownForm, self).__init__(*args, **kwargs) if towns and towns != -1: self.fields['town'].choices = [('', '--')] + towns @@ -1070,13 +1063,6 @@ class SelectedParcelForm(forms.Form): parcels = None if 'data' in kwargs and 'PARCELS' in kwargs['data']: parcels = kwargs['data']['PARCELS'] - # clean data if not "real" data - prefix_value = kwargs['prefix'] + '-parcel' - if not [k for k in kwargs['data'].keys() - if k.startswith(prefix_value) and kwargs['data'][k]]: - kwargs['data'] = None - if 'files' in kwargs: - kwargs.pop('files') super(SelectedParcelForm, self).__init__(*args, **kwargs) if parcels: self.fields['parcel'].choices = [('', '--')] + parcels |