Change python to actual booleans.
This commit is contained in:
parent
bc284e2514
commit
63b6d6944d
@ -44,6 +44,10 @@ def add_time():
|
|||||||
if fuelcost != '':
|
if fuelcost != '':
|
||||||
fuelcost = float(fuelcost)
|
fuelcost = float(fuelcost)
|
||||||
winter = request.form['winter']
|
winter = request.form['winter']
|
||||||
|
if winter == 'TRUE':
|
||||||
|
winter = True
|
||||||
|
else:
|
||||||
|
winter = False
|
||||||
|
|
||||||
json_body = [
|
json_body = [
|
||||||
{
|
{
|
||||||
@ -54,7 +58,7 @@ def add_time():
|
|||||||
"oilhealth": oilhealth,
|
"oilhealth": oilhealth,
|
||||||
"fuel": fuel,
|
"fuel": fuel,
|
||||||
"fuelcost": fuelcost,
|
"fuelcost": fuelcost,
|
||||||
"winter": bool(winter)
|
"winter": winter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -47,9 +47,9 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-4">
|
<div class="col-xs-4">
|
||||||
<label for="winter">Winter Tires:</label>
|
<label for="winter">Winter Tires:</label>
|
||||||
<select name="winter" class="form-control">
|
<select name="winter" class="form-control" default="false">
|
||||||
<option value="true">True</option>
|
<option value="TRUE">True</option>
|
||||||
<option value="false">False</option>
|
<option value="FALSE" selected>False</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div><br>
|
</div><br>
|
||||||
|
Loading…
Reference in New Issue
Block a user