This commit is contained in:
xaoyaoo 2024-08-07 21:58:31 +08:00
parent 6359464184
commit 02d4eb49d7
2 changed files with 2 additions and 4 deletions

View File

@ -40,9 +40,7 @@ def ReJson(code: int, body: [dict, list] = None, msg: str = None, error: str = N
rjson['msg'] = msg
if code != 0:
stack = traceback.extract_stack()
project_stack = [frame for frame in stack if "pywxdump" in frame.filename.lower() and
any(keyword in frame.filename for keyword in
["api", "db", "wx_core", "analyzer", "ui", "cli", "server"])]
project_stack = [frame for frame in stack]
# 格式化调用栈信息
formatted_stack = ''.join(traceback.format_list(project_stack))
# stack_trace = ''.join(traceback.format_stack())

View File

@ -60,7 +60,7 @@ class MicroHandler(DatabaseBase):
:return:
"""
if not self.table_exist.get("ContactLabel", False):
return []
return {}
sql = "SELECT LabelId, LabelName FROM ContactLabel ORDER BY LabelName ASC;"
result = self.execute(sql)
if not result: