Trap NaN frequencies and return None instead

This commit is contained in:
Ian Renton
2026-03-30 19:09:04 +01:00
parent 02f564b515
commit 8257ec492d
10 changed files with 26 additions and 22 deletions

View File

@@ -200,6 +200,10 @@ class Spot:
if self.de_dxcc_id and not self.de_flag:
self.de_flag = lookup_helper.get_flag_for_dxcc(self.de_dxcc_id)
# Remove NaNs in frequency
if freq and freq == float("nan"):
freq = None
# Band from frequency
if self.freq and not self.band:
band = infer_band_from_freq(self.freq)