From 900c03d27660186d20633de3ecfd91e1f65505c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=BC=9F?= <250213850@qq.com> Date: Wed, 3 Aug 2022 10:19:13 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BC=98=E5=8C=96=E7=94=A8=E6=88=B7=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=8A=9F=E8=83=BD=EF=BC=88=E6=9F=A5=E8=AF=A2=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=95=B0=E6=8D=AE=E5=90=8E=E6=8A=A5=E9=94=99=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api_v1/endpoints/query.py | 2 ++ 1 file changed, 2 insertions(+) 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'])