选题编译功能bug修正
This commit is contained in:
parent
a64d307518
commit
4eb43ab93e
|
|
@ -1235,9 +1235,13 @@ def generateLaTeXBodyContentfromMariaDB(cursor,id,misc): #根据id,读取的json
|
|||
for id_raw in ret_list:
|
||||
obj_id = id_raw[0]
|
||||
sql = "SELECT obj_content FROM lessonobj WHERE objid = %s;"
|
||||
objval = (obj_id,)
|
||||
cursor.execute(sql,objval)
|
||||
obj_list.append(f"{obj_id}\t{cursor.fetchall()[0][0]}")
|
||||
if not obj_id.upper() == "KNONE":
|
||||
objval = (obj_id,)
|
||||
cursor.execute(sql,objval)
|
||||
obj_list.append(f"{obj_id}\t{cursor.fetchall()[0][0]}")
|
||||
else:
|
||||
cursor.fetchall()
|
||||
obj_list.append(f"{obj_id}\t暂无目标对应")
|
||||
sql = "SELECT tagname FROM tagcorresp WHERE ID = %s;"
|
||||
cursor.execute(sql,val)
|
||||
tag_list = [t[0] for t in cursor.fetchall()]
|
||||
|
|
|
|||
Reference in New Issue