summaryrefslogtreecommitdiff
path: root/archaeological_operations/forms.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-03-23 15:49:01 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-03-23 15:49:01 +0100
commit4b7d7ecfbf67e7d98acdad9687abbff89419b6c9 (patch)
tree24196a06445c52a00a059086c46f4e8b29488010 /archaeological_operations/forms.py
parentc7849a2b4fd6ccd3160140c489d86e263d9f85a7 (diff)
downloadIshtar-4b7d7ecfbf67e7d98acdad9687abbff89419b6c9.tar.bz2
Ishtar-4b7d7ecfbf67e7d98acdad9687abbff89419b6c9.zip
Fix parcel sorting from a file
Diffstat (limited to 'archaeological_operations/forms.py')
-rw-r--r--archaeological_operations/forms.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py
index ce0e6d8be..12011ef28 100644
--- a/archaeological_operations/forms.py
+++ b/archaeological_operations/forms.py
@@ -311,7 +311,8 @@ class ParcelFormSet(FormSet):
and not public_domain:
Z = 'ZZZZZZZZZZZZZ'
return (Z, Z, Z, Z, Z)
- return (town, year, section, parcel_number, public_domain)
+ return (town.name if hasattr(town, "name") else None, year, section,
+ parcel_number, public_domain)
def as_table(self):
# add dynamic widget