mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-12-15 16:43:38 +00:00
Fix URLs for WOTA outlying fells
This commit is contained in:
@@ -98,7 +98,12 @@ def get_sig_ref_info(sig, sig_ref_id):
|
||||
for feature in data["features"]:
|
||||
if feature["properties"]["wotaId"] == sig_ref_id:
|
||||
sig_ref.name = feature["properties"]["title"]
|
||||
# Fudge WOTA URLs. Outlying fell (LDO) URLs don't match their ID numbers but require 214 to be
|
||||
# added to them
|
||||
sig_ref.url = "https://www.wota.org.uk/MM_" + sig_ref_id
|
||||
if sig_ref_id.upper().startswith("LDO-"):
|
||||
number = int(sig_ref_id.upper().replace("LDO-", ""))
|
||||
sig_ref.url = "https://www.wota.org.uk/MM_LDO-" + str(number + 214)
|
||||
sig_ref.grid = feature["properties"]["qthLocator"]
|
||||
sig_ref.latitude = feature["geometry"]["coordinates"][1]
|
||||
sig_ref.longitude = feature["geometry"]["coordinates"][0]
|
||||
|
||||
@@ -10,6 +10,7 @@ from core.cleanup import CleanupTimer
|
||||
from core.config import config, WEB_SERVER_PORT, SERVER_OWNER_CALLSIGN
|
||||
from core.constants import SOFTWARE_NAME, SOFTWARE_VERSION
|
||||
from core.lookup_helper import lookup_helper
|
||||
from core.sig_utils import get_sig_ref_info
|
||||
from core.status_reporter import StatusReporter
|
||||
from server.webserver import WebServer
|
||||
|
||||
|
||||
Reference in New Issue
Block a user