修改没有中文名的错误

This commit is contained in:
Xueyi Luo 2022-05-26 14:57:12 +08:00
parent cffe199de2
commit 40c1de8172
1 changed files with 6 additions and 2 deletions

View File

@ -505,10 +505,14 @@ class Sqlite3Server(object):
sql = "select display_name_cn from application where display_name='"+name+"'"
cursor.execute(sql)
connect.commit()
if cursor.fetchone():
return str(cursor.fetchone()[0])
else:
return ''
except Exception as e:
logging.error(_("Failed to initialize the database: %s"), str(e))
return False
return str(cursor.fetchone()[0])
def listtojsonstr(lists):
import json