First attempt at converting "sig" to "activity" for v3

This commit is contained in:
Ian Renton
2026-09-24 07:09:37 +01:00
parent 1d0129f7bb
commit d91fa70655
90 changed files with 822 additions and 496 deletions
+6 -6
View File
@@ -57,11 +57,11 @@ class SOTA(HTTPSpotProvider):
# Seen SOTA spots with no frequency!
mode=Mode.from_name(source_spot["mode"].upper()),
comment=source_spot["comments"],
sig=ActivityName.SOTA,
sig_refs=[
activity=ActivityName.SOTA,
activity_refs=[
ActivityRef(
id=source_spot["summitCode"],
sig=ActivityName.SOTA,
activity=ActivityName.SOTA,
name=source_spot["summitName"],
latitude=source_spot["latitude"],
longitude=source_spot["longitude"],
@@ -92,10 +92,10 @@ class SOTA(HTTPSpotProvider):
id_token = credentials.get("id_token", "")
if not access_token or not id_token:
raise ValueError("SOTA API tokens are required. Please log into SOTA in order to spot to it.")
sig_ref = spot.sig_refs[0].id if spot.sig_refs else ""
if sig_ref:
ref_id = spot.activity_refs[0].id if spot.activity_refs else ""
if ref_id:
# Split reference into association and summit codes
ref_split = sig_ref.split("/")
ref_split = ref_id.split("/")
# Figure out a valid mode. Borrowed this from PoLo :)
# https://github.com/ham2k/app-polo/blob/main/src/extensions/activities/sota/SOTAPostSelfSpot.js