mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-25 08:44:33 +00:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user