Change python to actual booleans.
This commit is contained in:
parent
bc284e2514
commit
63b6d6944d
@ -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
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -47,9 +47,9 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-4">
|
||||
<label for="winter">Winter Tires:</label>
|
||||
<select name="winter" class="form-control">
|
||||
<option value="true">True</option>
|
||||
<option value="false">False</option>
|
||||
<select name="winter" class="form-control" default="false">
|
||||
<option value="TRUE">True</option>
|
||||
<option value="FALSE" selected>False</option>
|
||||
</select>
|
||||
</div>
|
||||
</div><br>
|
||||
|
Loading…
Reference in New Issue
Block a user