mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-04-29 18:25:58 +00:00
Protection against strings getting into lat/lon
This commit is contained in:
@@ -337,6 +337,12 @@ class Spot:
|
||||
self.dx_grid = lookup_helper.infer_grid_from_callsign_dxcc(self.dx_call)
|
||||
self.dx_location_source = "DXCC"
|
||||
|
||||
# It looks like we can sometimes get a string into lat/lon, so reject that before we try looking anything up
|
||||
if type(self.dx_latitude) == "str" or type(self.dx_longitude) == "str":
|
||||
logging.warning("Received strings in lat/lon (" + str(self.dx_latitude) + ", " + str(self.dx_longitude) + "), rejecting it")
|
||||
self.dx_latitude = None
|
||||
self.dx_longitude = None
|
||||
|
||||
# CQ and ITU zone lookup, preferably from location but failing that, from callsign
|
||||
if not self.dx_cq_zone:
|
||||
if self.dx_latitude:
|
||||
|
||||
Reference in New Issue
Block a user