mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 22:37:44 +00:00
Split out event type SIGs, and do other enum conversions. Closes #138
This commit is contained in:
@@ -5,6 +5,7 @@ import requests
|
||||
from requests.exceptions import ConnectionError, ConnectTimeout, ReadTimeout
|
||||
|
||||
from core.constants import HTTP_HEADERS
|
||||
from core.enums import Mode, SIGRefType
|
||||
from data.sig_ref import SIGRef
|
||||
from data.spot import Spot
|
||||
from providers.spot.http_spot_provider import HTTPSpotProvider
|
||||
@@ -53,7 +54,7 @@ class SOTA(HTTPSpotProvider):
|
||||
if (source_spot["frequency"] is not None)
|
||||
else None,
|
||||
# Seen SOTA spots with no frequency!
|
||||
mode=source_spot["mode"].upper(),
|
||||
mode=Mode.from_name(source_spot["mode"].upper()),
|
||||
comment=source_spot["comments"],
|
||||
sig="SOTA",
|
||||
sig_refs=[
|
||||
@@ -64,6 +65,7 @@ class SOTA(HTTPSpotProvider):
|
||||
latitude=source_spot["latitude"],
|
||||
longitude=source_spot["longitude"],
|
||||
activation_score=source_spot["points"],
|
||||
ref_type=SIGRefType.SUMMIT,
|
||||
)
|
||||
],
|
||||
dx_latitude=source_spot["latitude"],
|
||||
|
||||
Reference in New Issue
Block a user