Fix state being True even if it is false.
This commit is contained in:
parent
3604248a83
commit
ac3e09fb19
|
@ -235,7 +235,8 @@ def update_quest(db):
|
||||||
else:
|
else:
|
||||||
return jsonify(errors._400_bv), 400
|
return jsonify(errors._400_bv), 400
|
||||||
elif i == "state":
|
elif i == "state":
|
||||||
state = bool(request.values["state"])
|
state = (True if str(request.values['state']).lower()
|
||||||
|
in ["1", "true"] else False)
|
||||||
if state is True:
|
if state is True:
|
||||||
quest.state = 1
|
quest.state = 1
|
||||||
else:
|
else:
|
||||||
|
@ -294,7 +295,8 @@ def update_side_quest(db):
|
||||||
else:
|
else:
|
||||||
return jsonify(errors._400_bv), 400
|
return jsonify(errors._400_bv), 400
|
||||||
elif i == "state":
|
elif i == "state":
|
||||||
state = bool(request.values["state"])
|
state = (True if str(request.values['state']).lower()
|
||||||
|
in ["1", "true"] else False)
|
||||||
if state is True:
|
if state is True:
|
||||||
quest.state = 1
|
quest.state = 1
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue