Skip to content

Commit

Permalink
fix a bug in track.py. (yihong0618#559)
Browse files Browse the repository at this point in the history
  • Loading branch information
conanyangqun authored Dec 2, 2023
1 parent 3f9584a commit b63aa7d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion run_page/gpxtrackposter/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ def load_from_db(self, activity):
self.start_time_local = start_time
self.end_time = start_time + activity.elapsed_time
self.length = float(activity.distance)
if not IGNORE_BEFORE_SAVING:
if IGNORE_BEFORE_SAVING:
summary_polyline = filter_out(activity.summary_polyline)
else:
summary_polyline = activity.summary_polyline
polyline_data = polyline.decode(summary_polyline) if summary_polyline else []
self.polylines = [[s2.LatLng.from_degrees(p[0], p[1]) for p in polyline_data]]
self.run_id = activity.run_id
Expand Down

0 comments on commit b63aa7d

Please sign in to comment.