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
commite426f8ef82dfa1f2c976fb08edec7014dc682bb9 (patch)
tree4ddf8a8cdee6f14f97ef9df28d32f40250f4bf64 /ishtar_common/utils.py
parent2b06b23dbc7b349cf81c21e6f49a8bc8049d9804 (diff)
downloadIshtar-e426f8ef82dfa1f2c976fb08edec7014dc682bb9.tar.bz2
Ishtar-e426f8ef82dfa1f2c976fb08edec7014dc682bb9.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