mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-27 08:49:27 +00:00
Implement templating to avoid copy/paste HTML code. #7
This commit is contained in:
@@ -17,7 +17,7 @@ from core.utils import infer_mode_type_from_mode, infer_band_from_freq, infer_co
|
||||
@dataclass
|
||||
class Spot:
|
||||
# Globally unique identifier for the spot
|
||||
guid: str = str(uuid.uuid4())
|
||||
guid: str = None
|
||||
# Callsign of the operator that has been spotted
|
||||
dx_call: str = None
|
||||
# Callsign of the operator that has spotted them
|
||||
@@ -91,6 +91,9 @@ class Spot:
|
||||
|
||||
# Infer missing parameters where possible
|
||||
def infer_missing(self):
|
||||
# Always create a GUID
|
||||
self.guid = str(uuid.uuid4())
|
||||
|
||||
# Clean up DX call if it has an SSID or -# from RBN
|
||||
if self.dx_call and "-" in self.dx_call:
|
||||
self.dx_call = self.dx_call.split("-")[0]
|
||||
|
||||
Reference in New Issue
Block a user