summaryrefslogtreecommitdiff
path: root/archaeological_operations/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2015-02-16 04:00:41 +0100
committerÉtienne Loks <etienne.loks@proxience.com>2015-05-06 15:48:16 +0200
commit0c00240278777e21c9c280d40ab23c083d935402 (patch)
treeab05222e38cae88102d34db1de6feb90887ae530 /archaeological_operations/forms.py
parentd11775206a00d7948f5f6e770ba6cf6f836f585c (diff)
downloadIshtar-0c00240278777e21c9c280d40ab23c083d935402.tar.bz2
Ishtar-0c00240278777e21c9c280d40ab23c083d935402.zip
Add public domain parcels management (refs #2284)
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r--archaeological_operations/forms.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py
index 2852db79f..d0e4be0d3 100644
--- a/archaeological_operations/forms.py
+++ b/archaeological_operations/forms.py
@@ -98,9 +98,10 @@ class ParcelForm(forms.Form):
if not self.cleaned_data or (DELETION_FIELD_NAME in self.cleaned_data \
and self.cleaned_data[DELETION_FIELD_NAME]):
return
- if not self.cleaned_data.get('parcel_number'):
+ if not self.cleaned_data.get('parcel_number') and \
+ self.cleaned_data.get('section') != 'DP':
return {}
- for key in ('town', 'parcel_number', 'section'):
+ for key in ('town', 'section'):
if not key in self.cleaned_data or not self.cleaned_data[key]:
raise forms.ValidationError(_(u"Town section and parcel number "
u"fields are required."))