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
+8
View File
@@ -99,6 +99,14 @@ _SUB_SPORT_MAPPING: dict[str, str] = {
BAS_SPORTS = {"cycling", "running", "hiking", "walking", "swimming", "skiing", "other"}
# Valid sub_sport values per sport, in display order.
SUB_SPORTS: dict[str, list[str]] = {
"cycling": ["road", "mountain", "gravel", "indoor"],
"running": ["trail", "track", "indoor"],
"swimming": ["open_water", "pool"],
"skiing": ["nordic", "alpine"],
}
def _normalise_key(raw: object) -> str:
key = str(raw).strip()