Allow QRP spots from PnP APIs #147

This commit is contained in:
Ian Renton
2026-09-18 20:56:46 +01:00
parent 7bdc26c926
commit 54d779f036
2 changed files with 12 additions and 15 deletions
+11 -10
View File
@@ -65,19 +65,20 @@ class ParksNPeaks(HTTPSpotProvider):
if not spot.de_call and m:
spot.de_call = str(m.group(1))
# Record activity information. Sometimes we get an activity of "QRP", which we ignore as it's not a
# programme with a defined set of references
# Record activity information
activity = source_spot["actClass"].upper()
ref_id = source_spot["actSiteID"]
if activity and activity != "" and activity != ActivityName.QRP and ref_id and ref_id != "":
if activity:
spot.sig = activity
activity_refs = [
ActivityRef(
id=source_spot["actSiteID"],
sig=source_spot["actClass"].upper(),
)
]
spot.sig_refs = activity_refs
activity_refs = []
if ref_id:
activity_refs = [
ActivityRef(
id=source_spot["actSiteID"],
sig=activity,
)
]
spot.sig_refs = activity_refs
# Free text location is not present in all spots, so only add it if it's set
if "actLocation" in source_spot and source_spot["actLocation"] != "":