mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-08-06 02:21:42 +00:00
Refactor of caching & data storage part 14 #118
This commit is contained in:
@@ -35,4 +35,13 @@ class Callsign:
|
||||
cq_zone: int | None = None
|
||||
# ITU zone in which the callsign indicates they are operating
|
||||
itu_zone: int | None = None
|
||||
# Location source. This can be "HOME QTH" or "DXCC" depending on which provider gave us a location
|
||||
location_source: str | None = None
|
||||
|
||||
def fully_populated(self):
|
||||
"""Utility method to indicate that the callsign data is fully populated. Multiple providers can return data for
|
||||
a callsign, and we try them in sequence until we have all the data we can, in which case there's no point
|
||||
querying any other providers."""
|
||||
return self.home_call is not None and self.name is not None and self.qth is not None and self.grid is not None\
|
||||
and self.latitude is not None and self.longitude is not None and self.country is not None and self.continent\
|
||||
is not None and self.dxcc_id is not None and self.cq_zone is not None and self.itu_zone is not None
|
||||
|
||||
Reference in New Issue
Block a user