summaryrefslogtreecommitdiff
path: root/archaeological_operations/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@peacefrogs.net>2013-09-08 12:12:33 +0200
committerÉtienne Loks <etienne.loks@peacefrogs.net>2013-09-08 12:12:33 +0200
commita9423fb3feaf48baee1766823dfdb80f5b629c52 (patch)
tree34d628d117acf0222768243080c3799b7c0c21d3 /archaeological_operations/forms.py
parent4f901089de6edd4d9a218bb50438a22bb24817d1 (diff)
downloadIshtar-a9423fb3feaf48baee1766823dfdb80f5b629c52.tar.bz2
Ishtar-a9423fb3feaf48baee1766823dfdb80f5b629c52.zip
Fix archaeological operation wizard when no town is available
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r--archaeological_operations/forms.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py
index 2071dd00f..b971361d8 100644
--- a/archaeological_operations/forms.py
+++ b/archaeological_operations/forms.py
@@ -145,7 +145,7 @@ class ParcelFormSet(FormSet):
if parcel.get('town'):
last_town = parcel.get('town')
break
- if not last_town:
+ if not last_town and 'town' in self.forms[0].fields.keys():
towns = self.forms[0].fields['town'].choices
if towns:
towns.pop(0) # remove first empty