From bc1b7a4b69c0b01d65435ab9d829a270e3f79a56 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 10 Jul 2024 11:53:19 +0200 Subject: 🐛 sheet - prevent crash when geodata are corrupted MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/models_common.py | 8 ++++++-- 1 file changed, 6 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 adc6ca9eb..0b34400a1 100644 --- a/ishtar_common/models_common.py +++ b/ishtar_common/models_common.py @@ -2433,8 +2433,12 @@ class GeoVectorData(Imported, OwnPerms): rounded_z = spatial_reference_system.round_z else: rounded_z = 3 - return self.get_coordinates(rounded=rounded, rounded_z=rounded_z, srid=srid, dim=dim, - cache=cache) + try: + return self.get_coordinates(rounded=rounded, rounded_z=rounded_z, srid=srid, dim=dim, + cache=cache) + except GDALException: + # bad conversion + return def get_coordinates(self, rounded=5, rounded_z=3, srid: int = None, dim=2, cache=False): if dim not in (2, 3): -- cgit v1.2.3