Strict adherence to canonical ActivityNames, to avoid the problem where Spothole was giving out activities like ["Towers", "TOWERS"]. All uses of ActivityName should now be canonical not arbitrary strings, and attempts to convert unknown strings to activitynames will be logged for me to check out.

This commit is contained in:
Ian Renton
2026-09-25 09:16:53 +01:00
parent 7417140a3d
commit 760c2412d3
17 changed files with 144 additions and 145 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
from dataclasses import dataclass
from core.enums import ActivityRefType
from core.enums import ActivityName, ActivityRefType
@dataclass
@@ -9,7 +9,7 @@ class ActivityRef:
name and a lookup URL."""
# Activity that this reference is in, e.g. "POTA".
activity: str
activity: ActivityName
# Reference ID, e.g. "GB-0001".
id: str | None = None
# Name of the reference, e.g. "Null Country Park", if known.