diff options
| 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 | 
| commit | 67edd0d6b3cfc09d325c75cc66054852763d1f9c (patch) | |
| tree | 24196a06445c52a00a059086c46f4e8b29488010 | |
| parent | 79f34d6beb9b7b9b136ffbbcbfa790db690c07f7 (diff) | |
| download | Ishtar-67edd0d6b3cfc09d325c75cc66054852763d1f9c.tar.bz2 Ishtar-67edd0d6b3cfc09d325c75cc66054852763d1f9c.zip  | |
Fix parcel sorting from a file
| -rw-r--r-- | archaeological_operations/forms.py | 3 | 
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  | 
