refactor1
This commit is contained in:
@@ -49,13 +49,16 @@ def store_value(id,key,value):
|
||||
mth.opened=bool(value)
|
||||
if key=="maintopic" and value in maintopic_values:
|
||||
mth.maintopic=str(value)
|
||||
if key=="lang" and value in maintopic_values:
|
||||
if key=="lang" and value in ["de", "en"]:
|
||||
mth.lang=str(value)
|
||||
if key =="trained":
|
||||
value = value in ["true", "True", "1", "t"]
|
||||
mth.istrained=bool(value)
|
||||
db_session.add(mth)
|
||||
db_session.commit()
|
||||
|
||||
|
||||
|
||||
@app.route("/<int:id>")
|
||||
def store_answered(id):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user