Skip to content

Commit

Permalink
prevent requests in the future from erroring out RAOB download
Browse files Browse the repository at this point in the history
  • Loading branch information
akrherz committed Mar 30, 2018
1 parent 482dc3c commit 312aae7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions htdocs/json/raob.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ def run(ts, sid):

res = {'profiles': []}
table = 'raob_profile_%s' % (ts.year,)
if ts.year > datetime.datetime.utcnow().year:
return json.dumps(res)

cursor.execute("""
SELECT p.pressure, p.height,
round(p.tmpc::numeric,1),
Expand Down

0 comments on commit 312aae7

Please sign in to comment.