summaryrefslogtreecommitdiff
path: root/ishtar_common/models_common.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-09-17 13:33:43 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:23:18 +0100
commit3d618e80d2df25c47a45afe503bda7a929df2aa8 (patch)
tree2a69c48df18caaea6ac04c6a9b9ea8e7e09d49de /ishtar_common/models_common.py
parent1cef4f6675db99a15905f722451dfa6ac1a954e9 (diff)
downloadIshtar-3d618e80d2df25c47a45afe503bda7a929df2aa8.tar.bz2
Ishtar-3d618e80d2df25c47a45afe503bda7a929df2aa8.zip
Geo form: fix point 3D creation and edition
Diffstat (limited to 'ishtar_common/models_common.py')
-rw-r--r--ishtar_common/models_common.py4
1 files changed, 2 insertions, 2 deletions
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: