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:
|
||||
return jsonify(errors._400_bv), 400
|
||||
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:
|
||||
quest.state = 1
|
||||
else:
|
||||
|
@ -294,7 +295,8 @@ def update_side_quest(db):
|
|||
else:
|
||||
return jsonify(errors._400_bv), 400
|
||||
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:
|
||||
quest.state = 1
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue