Skip to content

Commit

Permalink
Merge pull request #91 from lowtower/fix-missing-type
Browse files Browse the repository at this point in the history
fixes #90
  • Loading branch information
flopp authored Apr 1, 2021
2 parents 0043520 + 69384fc commit 545c551
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gpxtrackposter/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ def _load_gpx_data(self, gpx: gpxpy.gpx.GPX, timezone_adjuster: typing.Optional[
for s in t.segments:
line = [s2sphere.LatLng.from_degrees(p.latitude, p.longitude) for p in s.points]
self.polylines.append(line)
self.activity_type = gpx.tracks[0].type.lower()
if gpx.tracks[0].type:
self.activity_type = gpx.tracks[0].type.lower()

def append(self, other: "Track") -> None:
"""Append other track to self."""
Expand Down

0 comments on commit 545c551

Please sign in to comment.