diff --git a/core/constants.py b/core/constants.py index 59e9b35..5347eb6 100644 --- a/core/constants.py +++ b/core/constants.py @@ -27,7 +27,7 @@ SIGS = [ SIG(name="ZLOTA", description="New Zealand on the Air", icon="kiwi-bird", ref_regex=r"ZL[A-Z]/[A-Z]{2}\-\d{3,4}"), SIG(name="WOTA", description="Wainwrights on the Air", icon="w", ref_regex=r"[A-Z]{3}-[0-9]{2}"), SIG(name="BOTA", description="Beaches on the Air", icon="water"), - SIG(name="KRMNPA", description="Keith Roget Memorial National Parks Award", icon="earth-oceania", ref_regex=r""), + SIG(name="KRMNPA", description="Keith Roget Memorial National Parks Award", icon="earth-oceania"), SIG(name="WAB", description="Worked All Britain", icon="table-cells-large", ref_regex=r"[A-Z]{1,2}[0-9]{2}"), SIG(name="WAI", description="Worked All Ireland", icon="table-cells-large", ref_regex=r"[A-Z][0-9]{2}") ] diff --git a/data/spot.py b/data/spot.py index a53c758..7d841ad 100644 --- a/data/spot.py +++ b/data/spot.py @@ -388,7 +388,9 @@ class Spot: def append_sig_ref_if_missing(self, new_sig_ref): if not self.sig_refs: self.sig_refs = [] + if new_sig_ref.id.trim() == "": + return for sig_ref in self.sig_refs: - if sig_ref.id.upper() == new_sig_ref.id.upper() and sig_ref.sig.upper() == new_sig_ref.sig.upper(): + if sig_ref.id.trim().upper() == new_sig_ref.id.trim().upper() and sig_ref.sig.trim().upper() == new_sig_ref.sig.trim().upper(): return - self.sig_refs.append(new_sig_ref) + self.sig_refs.append(new_sig_ref.trim())