1.优化拷贝新看板时,数据库缺少字段而报异常的问题
This commit is contained in:
parent
31354d600c
commit
3a09f1d9aa
@ -149,7 +149,10 @@ async def event_model(
|
|||||||
) -> schemas.Msg:
|
) -> schemas.Msg:
|
||||||
""" 事件分析"""
|
""" 事件分析"""
|
||||||
await analysis.init(data_where=current_user.data_where)
|
await analysis.init(data_where=current_user.data_where)
|
||||||
|
try:
|
||||||
sqls = await analysis.event_model_sql()
|
sqls = await analysis.event_model_sql()
|
||||||
|
except Exception as e:
|
||||||
|
return schemas.Msg(code=-9, msg='报表配置参数异常')
|
||||||
res = []
|
res = []
|
||||||
is_hide = []
|
is_hide = []
|
||||||
|
|
||||||
|
@ -55,7 +55,10 @@ async def ltv_model_sql(
|
|||||||
sql = res['sql']
|
sql = res['sql']
|
||||||
#仅一条筛选条件则是把GM过滤后获取全部数据
|
#仅一条筛选条件则是把GM过滤后获取全部数据
|
||||||
if len(analysis.global_filters)==1 and analysis.global_filters[0]['strftv']=='GM':
|
if len(analysis.global_filters)==1 and analysis.global_filters[0]['strftv']=='GM':
|
||||||
|
try:
|
||||||
df = await ckdb.query_dataframe(sql)
|
df = await ckdb.query_dataframe(sql)
|
||||||
|
except Exception as e:
|
||||||
|
return schemas.Msg(code=-9, msg='报表配置参数异常')
|
||||||
#多条筛选条件则合成新的sql
|
#多条筛选条件则合成新的sql
|
||||||
else:
|
else:
|
||||||
new_sql=""""""
|
new_sql=""""""
|
||||||
|
Loading…
Reference in New Issue
Block a user