diff --git a/api/api_v1/endpoints/query.py b/api/api_v1/endpoints/query.py index 6a33298..b212e79 100644 --- a/api/api_v1/endpoints/query.py +++ b/api/api_v1/endpoints/query.py @@ -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'])