Fix bug.
This commit is contained in:
parent
d382a2b8f7
commit
93156311e2
|
@ -124,8 +124,10 @@ def index():
|
|||
#stations = select_all_stations(get_db_connection())
|
||||
#print(url_for("static", filename="test.txt", _external=True))
|
||||
stations = json.loads(requests.get(url_for("stations", _external=True)).text)['data']
|
||||
#stations = json.loads(requests.get("https://digi.w1cdn.net/aprs_api/stations").text)['data']
|
||||
# Convert unix time to datetime on the fly because I'm lazy right now
|
||||
for station in stations:
|
||||
if station['last_heard_unix'] != None:
|
||||
station['last_heard'] = datetime.datetime.fromtimestamp(station['last_heard_unix'])
|
||||
|
||||
return render_template('index.html',
|
||||
|
|
Loading…
Reference in New Issue
Block a user