Skip to content

Commit

Permalink
Merge pull request #11 from yihong0618/master
Browse files Browse the repository at this point in the history
fix: #10
  • Loading branch information
yihong0618 authored Oct 7, 2020
2 parents 2872542 + b6951b2 commit a1159f2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nrc_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,11 @@ def parse_activity_data(activity):
lon_index = None
ascent_index = None
heart_rate_index = None
if not activity.get("metrics"):
warning(
f"\tThe activity {activity['id']} doesn't contain metrics information"
)
return None
for i, metric in enumerate(activity["metrics"]):
if metric["type"] == "latitude":
lat_index = i
Expand Down

0 comments on commit a1159f2

Please sign in to comment.