From 6c354e40a953dc3c4557ac869fe77e668bc8d176 Mon Sep 17 00:00:00 2001 From: Gogs Date: Sun, 29 Jan 2017 00:16:51 -0500 Subject: [PATCH] Improve the fuel and fuelcost type handling --- influx_frontend.py | 4 ++++ templates/layout.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/influx_frontend.py b/influx_frontend.py index 354580b..f8930b7 100644 --- a/influx_frontend.py +++ b/influx_frontend.py @@ -25,7 +25,11 @@ def add_time(): odometer = request.form['odometer'] oilhealth= request.form['oilhealth'] fuel = request.form['fuel'] + if fuel != '': + fuel = float(fuel) fuelcost = request.form['fuelcost'] + if fuelcost != '': + fuelcost = float(fuelcost) winter = request.form['winter'] json_body = [ diff --git a/templates/layout.html b/templates/layout.html index 46b2766..98ea575 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -15,7 +15,7 @@ - +