fixing stuff after splitting jsons

This commit is contained in:
Davide Scaini
2026-04-09 15:27:00 +02:00
parent 8118f6f316
commit 084c652fdd
6 changed files with 315 additions and 17 deletions
+4 -2
View File
@@ -50,8 +50,10 @@ def write_activity(
source = _infer_source(activity)
has_gps = metrics.bbox is not None and privacy not in ("no_gps", "private")
# Build timeseries once — written to a separate file to keep detail JSON small
timeseries = build_timeseries(activity.points, activity.started_at, privacy)
# Build timeseries once — written to a separate file to keep detail JSON small.
# Treat an empty timeseries (no points) as None so no file is created.
_ts = build_timeseries(activity.points, activity.started_at, privacy)
timeseries = _ts if _ts.get("t") else None
tag = activity.source_hash[-8:] if activity.source_hash else "unknown"
# ── detail JSON ──────────────────────────────────────────────────────────