mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-08-05 18:11:41 +00:00
Refactor of caching & data storage part 5 #118
This commit is contained in:
@@ -17,7 +17,7 @@ class IOTA(FileDownloadSIGRefDataProvider):
|
||||
super().__init__(self.SIG, provider_config, self.DATA_URL, self.POLL_INTERVAL_DAYS)
|
||||
|
||||
def _http_response_to_data(self, http_response):
|
||||
new_data = {}
|
||||
new_data = []
|
||||
data = http_response.json()
|
||||
if isinstance(data, list):
|
||||
for ref in data:
|
||||
@@ -30,7 +30,7 @@ class IOTA(FileDownloadSIGRefDataProvider):
|
||||
except ValueError:
|
||||
logging.debug(f"Error converting lat/lon to locator for an IOTA reference %f %f", latitude, longitude)
|
||||
|
||||
new_data[ref_id] = SIGRef(sig=self.SIG, id=ref_id, name=ref["name"],
|
||||
grid=grid, latitude=latitude, longitude=longitude)
|
||||
new_data.append(SIGRef(sig=self.SIG, id=ref_id, name=ref["name"],
|
||||
grid=grid, latitude=latitude, longitude=longitude))
|
||||
|
||||
return new_data
|
||||
|
||||
Reference in New Issue
Block a user