Improve the fuel and fuelcost type handling

This commit is contained in:
Gogs 2017-01-29 00:16:51 -05:00
parent 98d2c082ee
commit 6c354e40a9
2 changed files with 5 additions and 1 deletions

View File

@ -25,7 +25,11 @@ def add_time():
odometer = request.form['odometer'] odometer = request.form['odometer']
oilhealth= request.form['oilhealth'] oilhealth= request.form['oilhealth']
fuel = request.form['fuel'] fuel = request.form['fuel']
if fuel != '':
fuel = float(fuel)
fuelcost = request.form['fuelcost'] fuelcost = request.form['fuelcost']
if fuelcost != '':
fuelcost = float(fuelcost)
winter = request.form['winter'] winter = request.form['winter']
json_body = [ json_body = [