Fix ordering of languages when inserting into DB

master
Aadhavan Srinivasan 2 weeks ago
parent 0e26b2345a
commit 9cc650a467

@ -201,8 +201,8 @@ def romanizeHandler():
"mr": "mr",
"ta": "ta",
"te": "te",
"ml": "ml",
"kn": "kn",
"ml": "ml",
"or": "or",
"gu": "gu",
"ur": "ur",
@ -243,6 +243,7 @@ def romanizeHandler():
"awadhi": "awa",
"english": "en",
}
code2lang = {v:k for k,v in lang2code.items()}
rtv = dict()
@ -279,7 +280,7 @@ def romanizeHandler():
rtvJson = jsonify(rtv)
rtv["en"] = englishWord
cur.execute("INSERT INTO romanizations VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", tuple(rtv.values()))
cur.execute("INSERT INTO romanizations " + str(tuple([code2lang[val] for val in rtv.keys()])) + " VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)", tuple(rtv.values()))
con.commit()
con.close()

Loading…
Cancel
Save