second pass at issues. critical ones.
This commit is contained in:
@@ -76,8 +76,7 @@ def _process_file(path: Path) -> dict:
|
||||
|
||||
try:
|
||||
metrics = compute(activity)
|
||||
activity_id = make_activity_id(activity)
|
||||
write_activity(
|
||||
activity_id = write_activity(
|
||||
activity, metrics, _output_dir,
|
||||
privacy=_privacy,
|
||||
rdp_epsilon=_rdp_epsilon,
|
||||
|
||||
@@ -90,6 +90,7 @@ def write_activity(
|
||||
if existing.get("source_hash") != activity.source_hash:
|
||||
activity_id = f"{activity_id}-{activity.source_hash[-6:]}"
|
||||
json_path = acts_dir / f"{activity_id}.json"
|
||||
detail["id"] = activity_id
|
||||
json_path.write_text(json.dumps(detail, indent=2, ensure_ascii=False))
|
||||
|
||||
# ── GeoJSON track ────────────────────────────────────────────────────────
|
||||
|
||||
@@ -122,7 +122,8 @@
|
||||
"minItems": 2,
|
||||
"maxItems": 2
|
||||
}
|
||||
}
|
||||
},
|
||||
"custom": { "type": "object" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
|
||||
@@ -98,7 +98,8 @@
|
||||
}
|
||||
}
|
||||
} catch (e: any) {
|
||||
error = `Upload failed: ${e.message}`;
|
||||
saveStatus = `Upload failed: ${e.message}`;
|
||||
saveOk = false;
|
||||
} finally {
|
||||
uploading = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user