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 = [

View File

@ -15,7 +15,7 @@
<link href="{{ url_for('static', filename='css/bootstrap-editable.css') }}" rel="stylesheet"> <link href="{{ url_for('static', filename='css/bootstrap-editable.css') }}" rel="stylesheet">
</head> </head>
<script src="{{url_for('static', filename='jquery-2.1.4.min.js') }}"></script> <script src="{{ url_for('static', filename='jquery-2.1.4.min.js') }}"></script>
<script src="{{ url_for('static', filename='jquery-ui.js') }}"></script> <script src="{{ url_for('static', filename='jquery-ui.js') }}"></script>
<script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script> <script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
<!--Downloads--> <!--Downloads-->