Misc tweaks

This commit is contained in:
Ian Renton
2025-09-30 22:18:02 +01:00
parent 6749a97f99
commit 9e495a3fae
4 changed files with 14 additions and 3 deletions

View File

@@ -91,6 +91,10 @@ class Spot:
# Infer missing parameters where possible
def infer_missing(self):
# Clean up DX call if it has an SSID or -# from RBN
if self.dx_call and "-" in self.dx_call:
self.dx_call = self.dx_call.split("-")[0]
# DX country, continent, zones etc. from callsign
if self.dx_call and not self.dx_country:
self.dx_country = infer_country_from_callsign(self.dx_call)
@@ -105,6 +109,10 @@ class Spot:
if self.dx_dxcc_id and not self.dx_flag:
self.dx_flag = DXCC_FLAGS[self.dx_dxcc_id]
# Clean up spotter call if it has an SSID or -# from RBN
if self.de_call and "-" in self.de_call:
self.de_call = self.de_call.split("-")[0]
# Spotter country, continent, zones etc. from callsign
if self.de_call and not self.de_country:
self.de_country = infer_country_from_callsign(self.de_call)