From 31516463dd4b29e192c7b6c5b4e9ed02092eabd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Antoine=20Dupr=C3=A9?= Date: Mon, 10 Jun 2024 12:47:59 +0200 Subject: [PATCH] Fix : Apidae Trek parser now ignores when no linestring in GPX Previously caused a crash. --- geotrek/trekking/parsers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/geotrek/trekking/parsers.py b/geotrek/trekking/parsers.py index da92bac6f3..9b35e93d8a 100644 --- a/geotrek/trekking/parsers.py +++ b/geotrek/trekking/parsers.py @@ -922,6 +922,8 @@ def _get_geom_from_gpx(data): geos = ApidaeTrekParser._maybe_get_linestring_from_layer(layer) if geos: break + else: + raise RowImportError("No LineString feature found in GPX layers tracks or routes") geos.transform(settings.SRID) return geos