Skip to content

Commit

Permalink
Fix : Apidae Trek parser now ignores when no linestring in GPX
Browse files Browse the repository at this point in the history
Previously caused a crash.
  • Loading branch information
marcantoinedupre committed Jun 10, 2024
1 parent 428c981 commit 3151646
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions geotrek/trekking/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Check warning on line 926 in geotrek/trekking/parsers.py

View check run for this annotation

Codecov / codecov/patch

geotrek/trekking/parsers.py#L926

Added line #L926 was not covered by tests
geos.transform(settings.SRID)
return geos

Expand Down

0 comments on commit 3151646

Please sign in to comment.