From 63b6d6944dd6f0e9a47fbdd0314b0a81ab1209e8 Mon Sep 17 00:00:00 2001 From: Gogs Date: Sun, 9 Apr 2017 18:36:01 -0400 Subject: [PATCH] Change python to actual booleans. --- influx_frontend.py | 6 +++++- templates/index.html | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/influx_frontend.py b/influx_frontend.py index 648c9c9..ca86d22 100644 --- a/influx_frontend.py +++ b/influx_frontend.py @@ -44,6 +44,10 @@ def add_time(): if fuelcost != '': fuelcost = float(fuelcost) winter = request.form['winter'] + if winter == 'TRUE': + winter = True + else: + winter = False json_body = [ { @@ -54,7 +58,7 @@ def add_time(): "oilhealth": oilhealth, "fuel": fuel, "fuelcost": fuelcost, - "winter": bool(winter) + "winter": winter } } ] diff --git a/templates/index.html b/templates/index.html index d41ebad..78369c8 100644 --- a/templates/index.html +++ b/templates/index.html @@ -47,9 +47,9 @@
- + +