From 82ff03721678b5f9ea7868ce403167b0e9a54490 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sat, 17 Sep 2022 13:33:43 +0200 Subject: Geo form: fix point 3D creation and edition --- ishtar_common/models_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ishtar_common/models_common.py') diff --git a/ishtar_common/models_common.py b/ishtar_common/models_common.py index b72251f02..37ddd11df 100644 --- a/ishtar_common/models_common.py +++ b/ishtar_common/models_common.py @@ -2277,7 +2277,7 @@ class GeoVectorData(Imported, OwnPerms): if dim == 3: coordinates.append(self.cached_z) else: - if self.x or self.y or self.z: # user input + if self.x or self.y: # user input if not srid or not self.spatial_reference_system or \ srid == self.spatial_reference_system.srid: coordinates = [self.x, self.y] @@ -2315,7 +2315,7 @@ class GeoVectorData(Imported, OwnPerms): else: if dim == 2: return [None, None] - return [None, None, None] + return [None, None, self.z or None] point = geom if not srid or srid != geom.srid: -- cgit v1.2.3