|
|
|
@ -495,7 +495,7 @@ def get_alerts(countyCodes):
|
|
|
|
alerts = OrderedDict(list(alerts.items())[:MAX_ALERTS])
|
|
|
|
alerts = OrderedDict(list(alerts.items())[:MAX_ALERTS])
|
|
|
|
|
|
|
|
|
|
|
|
# We store the alerts in a file for future use if the API is unreachable.
|
|
|
|
# We store the alerts in a file for future use if the API is unreachable.
|
|
|
|
with open(DATA_FILE, 'w') as f:
|
|
|
|
with open(DATA_FILE, "w") as f:
|
|
|
|
json.dump({"alerts": dict(alerts)}, f)
|
|
|
|
json.dump({"alerts": dict(alerts)}, f)
|
|
|
|
|
|
|
|
|
|
|
|
return alerts
|
|
|
|
return alerts
|
|
|
|
|