summaryrefslogtreecommitdiff
path: root/ishtar_common/utils.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-03-15 13:02:28 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:21:00 +0100
commitb36bd54a551eedb1129e60c3edc558591d417b9a (patch)
tree4ddf8a8cdee6f14f97ef9df28d32f40250f4bf64 /ishtar_common/utils.py
parent4770486294b3c85ec986521abf4fbd8fe64d92ae (diff)
downloadIshtar-b36bd54a551eedb1129e60c3edc558591d417b9a.tar.bz2
Ishtar-b36bd54a551eedb1129e60c3edc558591d417b9a.zip
Geodata: fix cached value update for geovector
Diffstat (limited to 'ishtar_common/utils.py')
-rw-r--r--ishtar_common/utils.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py
index a7e07ebde..88c9129a3 100644
--- a/ishtar_common/utils.py
+++ b/ishtar_common/utils.py
@@ -774,16 +774,13 @@ def _post_save_geodata(sender, **kwargs):
modified = True
# managed cached coordinates
- # TODO
cached_x, cached_y, cached_z = None, None, None
- coords = instance.display_coordinates(rounded=False, dim=3)
- if coords:
+ coords = instance.display_coordinates(rounded=False, dim=3, cache=False)
+ if coords and coords != [None, None, None]:
cached_x, cached_y, cached_z = coords
else:
- coords = instance.display_coordinates(rounded=False, dim=2)
- if not coords:
- coords = instance.get_coordinates_from_polygon(rounded=False)
+ coords = instance.display_coordinates(rounded=False, dim=2, cache=False)
if coords:
cached_x, cached_y = coords