From b63aa7d52c0823ba6a3c2fe963bc34e536c32341 Mon Sep 17 00:00:00 2001 From: conanyangqun Date: Sat, 2 Dec 2023 22:26:37 +0800 Subject: [PATCH] fix a bug in track.py. (#559) --- run_page/gpxtrackposter/track.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/run_page/gpxtrackposter/track.py b/run_page/gpxtrackposter/track.py index 3eac70c52bd..3172db26a1c 100644 --- a/run_page/gpxtrackposter/track.py +++ b/run_page/gpxtrackposter/track.py @@ -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