diff options
| -rw-r--r-- | CHANGES.md | 6 | ||||
| -rw-r--r-- | archaeological_operations/forms.py | 13 | ||||
| -rw-r--r-- | ishtar_common/version.py | 4 | 
3 files changed, 13 insertions, 10 deletions
| diff --git a/CHANGES.md b/CHANGES.md index 36add5f32..67d2a19b0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,12 @@  Ishtar changelog  ================ +v3.1.12 - 2021-04-20 +-------------------- + +### Bug fixes ### +- Fix parcel sorting +  v3.1.11 - 2021-04-19  -------------------- diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index bd237488d..288a4f074 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -302,17 +302,14 @@ class ParcelFormSet(FormSet):                  parcel_number += str(int(p))              except ValueError:                  break -        if not parcel_number: -            parcel_number = 0 -        else: -            parcel_number = int(parcel_number) +        parcel_number = int(parcel_number) if parcel_number else 0          # empty must be at the end          if not year and not section and not parcel_number \                  and not public_domain: -            Z = 'ZZZZZZZZZZZZZ' -            return (Z, Z, Z, Z, Z) -        return (town.name if hasattr(town, "name") else None, year, section, -                parcel_number, public_domain) +            default = 'ZZZZZ' +            return default, default, default, default, default +        return (town.name if hasattr(town, "name") else "", year or '', section or "", +                parcel_number or "", public_domain)      def as_table(self):          # add dynamic widget diff --git a/ishtar_common/version.py b/ishtar_common/version.py index 4e8e1c5e8..3ae05dc45 100644 --- a/ishtar_common/version.py +++ b/ishtar_common/version.py @@ -1,5 +1,5 @@ -# 3.1.11 -VERSION = (3, 1, 11) +# 3.1.12 +VERSION = (3, 1, 12)  def get_version(): | 
