diff --git a/data/spot.py b/data/spot.py index 1fcaed4..20fbcb4 100644 --- a/data/spot.py +++ b/data/spot.py @@ -337,11 +337,15 @@ 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 + # It looks like we can sometimes get a string into lat/lon, so try to parse as float, reject if not valid if isinstance(self.dx_latitude, str) or isinstance(self.dx_longitude, str): - logging.warning("Received strings in lat/lon (" + str(self.dx_latitude) + ", " + str(self.dx_longitude) + ") for call " + self.dx_call + ", rejecting it") - self.dx_latitude = None - self.dx_longitude = None + try: + self.dx_latitude = float(self.dx_latitude) + self.dx_longitude = float(self.dx_longitude) + except (TypeError, ValueError): + logging.warning("Received non-numeric strings in lat/lon (" + str(self.dx_latitude) + ", " + str(self.dx_longitude) + ") for call " + self.dx_call + ", 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: diff --git a/templates/about.html b/templates/about.html index cd48da2..75e5ed2 100644 --- a/templates/about.html +++ b/templates/about.html @@ -67,7 +67,7 @@

This software is dedicated to the memory of Tom G1PJB, SK, a friend and colleague who sadly passed away around the time I started writing it in Autumn 2025. I was looking forward to showing it to you when it was done.

- + {% end %} \ No newline at end of file diff --git a/templates/add_spot.html b/templates/add_spot.html index 56fba33..a900cf0 100644 --- a/templates/add_spot.html +++ b/templates/add_spot.html @@ -69,8 +69,8 @@ - - + + {% end %} \ No newline at end of file diff --git a/templates/alerts.html b/templates/alerts.html index 829bf42..30bb7e4 100644 --- a/templates/alerts.html +++ b/templates/alerts.html @@ -56,8 +56,8 @@ - - + + {% end %} \ No newline at end of file diff --git a/templates/bands.html b/templates/bands.html index 0062384..15020dc 100644 --- a/templates/bands.html +++ b/templates/bands.html @@ -62,9 +62,9 @@ - - - + + + {% end %} \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index cf7d266..3d5b1a6 100644 --- a/templates/base.html +++ b/templates/base.html @@ -46,10 +46,10 @@ crossorigin="anonymous"> - - - - + + + + diff --git a/templates/conditions.html b/templates/conditions.html index f2e172c..8ca8ae5 100644 --- a/templates/conditions.html +++ b/templates/conditions.html @@ -189,8 +189,8 @@ - - + + {% end %} \ No newline at end of file diff --git a/templates/map.html b/templates/map.html index 0fc23f1..816a616 100644 --- a/templates/map.html +++ b/templates/map.html @@ -70,9 +70,9 @@ - - - + + + {% end %} \ No newline at end of file diff --git a/templates/spots.html b/templates/spots.html index 7cc7755..6b8ebca 100644 --- a/templates/spots.html +++ b/templates/spots.html @@ -87,9 +87,9 @@ - - - + + + {% end %} \ No newline at end of file diff --git a/templates/status.html b/templates/status.html index 83fc03f..4601180 100644 --- a/templates/status.html +++ b/templates/status.html @@ -59,8 +59,8 @@ - - + +