Commit a0d5ed2c authored by Bruce Flynn's avatar Bruce Flynn

app: handle stations with no records

parent b57c3fde
......@@ -133,8 +133,8 @@ def data_netcdf_view(request):
def stations_view(request):
db = request.registry.settings['db']
return [{'name': r['name'],
'min_available': util.unixtime(r['min']),
'max_available': util.unixtime(r['max'])}
'min_available': util.unixtime(r['min']) if r['min'] else None,
'max_available': util.unixtime(r['max']) if r['max'] else None}
for r in db.get_stations()]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment