Fix a bug where supplying a grid reference when adding a spot to the API resulted in dx_location_source=NONE in the spot object. Closes #90

This commit is contained in:
Ian Renton
2026-01-02 09:37:57 +00:00
parent f31148686d
commit 5482da0e69

View File

@@ -224,8 +224,8 @@ class Spot:
if self.mode and not self.mode_type: if self.mode and not self.mode_type:
self.mode_type = lookup_helper.infer_mode_type_from_mode(self.mode) self.mode_type = lookup_helper.infer_mode_type_from_mode(self.mode)
# If we have a latitude at this point, it can only have been provided by the spot itself # If we have a latitude or grid at this point, it can only have been provided by the spot itself
if self.dx_latitude: if self.dx_latitude or self.dx_grid:
self.dx_location_source = "SPOT" self.dx_location_source = "SPOT"
# Set the top-level "SIG" if it is missing but we have at least one SIG ref. # Set the top-level "SIG" if it is missing but we have at least one SIG ref.