Add sub_sport editing to activity edit drawer

This commit is contained in:
Davide Scaini
2026-05-12 23:01:12 +02:00
parent 93f6109028
commit 867da767eb
5 changed files with 48 additions and 3 deletions
+4
View File
@@ -54,6 +54,8 @@ def apply_sidecar(detail: dict, fm: dict, body: str) -> dict:
d["title"] = str(fm["title"])
if "sport" in fm:
d["sport"] = str(fm["sport"])
if "sub_sport" in fm:
d["sub_sport"] = str(fm["sub_sport"]) if fm["sub_sport"] else None
if "gear" in fm:
d["gear"] = str(fm["gear"]) if fm["gear"] else d.get("gear")
if body:
@@ -80,6 +82,8 @@ def _apply_sidecar_summary(summary: dict, fm: dict) -> dict:
s["title"] = str(fm["title"])
if "sport" in fm:
s["sport"] = str(fm["sport"])
if "sub_sport" in fm:
s["sub_sport"] = str(fm["sub_sport"]) if fm["sub_sport"] else None
if "highlight" in fm:
s["custom"]["highlight"] = bool(fm["highlight"])
if "private" in fm: