Start converting some enum-like strings to proper enums

This commit is contained in:
Ian Renton
2026-09-02 07:26:02 +01:00
parent 55eaa871e9
commit fa2e4b929a
21 changed files with 132 additions and 111 deletions
+3 -2
View File
@@ -7,6 +7,7 @@ from datetime import datetime, timedelta
import pytz
from core.call_lookup_helper import get_call_info
from core.enums import Continent
from core.sig_lookup_helper import populate_missing_sig_ref_info
from core.utils import get_flag_for_dxcc
@@ -28,7 +29,7 @@ class Alert:
# Country flag of the DX operator
dx_flag: str | None = None
# Continent of the DX operator
dx_continent: str | None = None
dx_continent: Continent | None = None
# DXCC ID of the DX operator
dx_dxcc_id: int | None = None
# CQ zone of the DX operator
@@ -92,7 +93,7 @@ class Alert:
if self.dx_calls and self.dx_calls[0] and not self.dx_country:
self.dx_country = call_info.country
if self.dx_calls and self.dx_calls[0] and not self.dx_continent:
self.dx_continent = call_info.continent
self.dx_continent = Continent(call_info.continent)
if self.dx_calls and self.dx_calls[0] and not self.dx_cq_zone:
self.dx_cq_zone = call_info.cq_zone
if self.dx_calls and self.dx_calls[0] and not self.dx_itu_zone: