Add sub_sport editing to activity edit drawer
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user