1.优化用户查询功能(查询没有数据后报错的问题)

This commit is contained in:
李伟 2022-08-03 10:19:13 +08:00
parent cc48dada37
commit 900c03d276

View File

@ -2069,6 +2069,8 @@ async def user_property_model(
df = await ckdb.query_dataframe(sql)
except Exception as e:
return schemas.Msg(code=0, msg='查询参数不匹配', data=e)
if df.empty:
return schemas.Msg(code=-9, msg='查无数据')
# 转换成列表返回
df.fillna(0, inplace=True)
account_id = list(df['#account_id'])