Move checks for multiple references in comments out of POTA and DX Cluster classes into the main infer_missing() function for spots. #54

This commit is contained in:
Ian Renton
2025-11-02 16:18:33 +00:00
parent 286ff66721
commit 92af0761aa
4 changed files with 41 additions and 26 deletions

View File

@@ -38,12 +38,6 @@ class POTA(HTTPSpotProvider):
dx_latitude=source_spot["latitude"],
dx_longitude=source_spot["longitude"])
# Sometimes we can get other refs in the comments for n-fer activations, extract them
all_comment_refs = re.findall(get_ref_regex_for_sig("POTA"), spot.comment)
for r in all_comment_refs:
if r not in list(map(lambda ref: ref.id, spot.sig_refs)):
spot.sig_refs.append(SIGRef(id=r.upper(), sig="POTA"))
# Add to our list. Don't worry about de-duping, removing old spots etc. at this point; other code will do
# that for us.
new_spots.append(spot)