Skip to content

Commit

Permalink
Update app.py to show sgv via workaround (#1391)
Browse files Browse the repository at this point in the history
As per @renegadeandy pull request renegadeandy#1

just tested it and it works nicely, so making PR for Dev.
  • Loading branch information
Foxy7 authored Jan 5, 2021
1 parent 5635387 commit 1d9e5f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion www/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def enacted():

@app.route("/glucose")
def glucose():
if os.path.getmtime(myopenaps_dir + "xdrip/glucose.json") > os.path.getmtime(myopenaps_dir + "monitor/glucose.json"):
if os.path.getmtime(myopenaps_dir + "xdrip/glucose.json") > os.path.getmtime(myopenaps_dir + "monitor/glucose.json") and os.path.getsize(myopenaps_dir + "xdrip/glucose.json") > 0:
json_url = os.path.join(myopenaps_dir + "xdrip/glucose.json")
else:
json_url = os.path.join(myopenaps_dir + "monitor/glucose.json")
Expand Down

0 comments on commit 1d9e5f5

Please sign in to comment.