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