1.优化拷贝看板去其他项目时,缺少字段而报异常的情况
This commit is contained in:
parent
a09ec0b54d
commit
bbbfa90275
@ -369,7 +369,10 @@ async def retention_model(request: Request,
|
||||
current_user: schemas.UserDB = Depends(deps.get_current_user)
|
||||
) -> schemas.Msg:
|
||||
await analysis.init(data_where=current_user.data_where)
|
||||
try:
|
||||
res = await analysis.retention_model_sql2() #初始化开始时间结束时间,sql语句 字典
|
||||
except Exception as e:
|
||||
return schemas.Msg(code=-9, msg='报表配置参数异常')
|
||||
sql = res['sql'] #获取到sql语句
|
||||
df = await ckdb.query_dataframe(sql)
|
||||
if df.empty:
|
||||
@ -965,7 +968,10 @@ async def scatter_model(
|
||||
"""分布分析 模型"""
|
||||
await analysis.init(data_where=current_user.data_where)
|
||||
event_type = analysis.events[0]['eventName']
|
||||
try:
|
||||
res = await analysis.scatter_model_sql()
|
||||
except Exception as e:
|
||||
return schemas.Msg(code=-9, msg='报表配置参数异常')
|
||||
end_date=analysis.end_date
|
||||
start_date=analysis.start_date
|
||||
where=analysis.events[-1]['quotaname']
|
||||
|
Loading…
Reference in New Issue
Block a user