diff --git a/providers/callsigndata/qrz.py b/providers/callsigndata/qrz.py index 1332973..afdc5d9 100644 --- a/providers/callsigndata/qrz.py +++ b/providers/callsigndata/qrz.py @@ -129,6 +129,13 @@ class QRZ(APIQueryCallsignDataProvider): def qrz_response_to_callsign(callsign, data): """Convert the "Callsign" block in QRZ's API response to our own Callsign object.""" + # I have encountered a user passing multiple callsigns to the QRZ lookup function in a way that QRZ actually + # does handle, and returns a list of callsign data. If we encounter that, just take the first one, as our own + # functions can't deal with multiple calls this way. + if isinstance(data, list): + data = data[0] + callsign = data["call"] + # Get a name name = None if "name_fmt" in data: diff --git a/providers/spot/wota.py b/providers/spot/wota.py index a66b813..c08b32c 100644 --- a/providers/spot/wota.py +++ b/providers/spot/wota.py @@ -61,10 +61,11 @@ class WOTA(HTTPSpotProvider): try: desc_split = source_spot.description.split(". ") freq_mode = desc_split[0].replace("Frequencies/modes:", "").strip() - freq_mode_split = re.split(r"[\-\s]+", freq_mode) - freq_hz = float(freq_mode_split[0].replace("'", ".")) * 1000000 - if len(freq_mode_split) > 1: - mode = freq_mode_split[1].upper() + if freq_mode and freq_mode != "-": + freq_mode_split = re.split(r"[\-\s]+", freq_mode) + freq_hz = float(freq_mode_split[0].replace("'", ".")) * 1000000 + if len(freq_mode_split) > 1: + mode = freq_mode_split[1].upper() if len(desc_split) > 1: comment = desc_split[1].strip() diff --git a/templates/add_spot.html b/templates/add_spot.html index e63b4eb..2c5b871 100644 --- a/templates/add_spot.html +++ b/templates/add_spot.html @@ -76,7 +76,7 @@ - + diff --git a/templates/alerts.html b/templates/alerts.html index 3dadaaf..934dbf8 100644 --- a/templates/alerts.html +++ b/templates/alerts.html @@ -84,7 +84,7 @@ - + diff --git a/templates/bands.html b/templates/bands.html index 7253036..23a894b 100644 --- a/templates/bands.html +++ b/templates/bands.html @@ -76,8 +76,8 @@ - - + + diff --git a/templates/base.html b/templates/base.html index 3b3aeb7..2b4eeb9 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,6 +1,6 @@ {% extends "skeleton.html" %} {% block head_extra %} - + @@ -15,10 +15,10 @@ window.fetchEventSource = fetchEventSource; - - - - + + + + {% end %} {% block body %}
diff --git a/templates/conditions.html b/templates/conditions.html index c86e96a..c2120f8 100644 --- a/templates/conditions.html +++ b/templates/conditions.html @@ -284,7 +284,7 @@
- + diff --git a/templates/map.html b/templates/map.html index dd3a28b..a9ce8a9 100644 --- a/templates/map.html +++ b/templates/map.html @@ -109,8 +109,8 @@ - - + + diff --git a/templates/spots.html b/templates/spots.html index e0d98d4..eb7d9de 100644 --- a/templates/spots.html +++ b/templates/spots.html @@ -113,8 +113,8 @@ - - + + diff --git a/templates/status.html b/templates/status.html index dac3ea2..3ffe859 100644 --- a/templates/status.html +++ b/templates/status.html @@ -86,7 +86,7 @@ - +